aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/image.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index f9c75b19..5dccfec6 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -887,8 +887,7 @@ static void mark_flagged_pixels_naninf(float *dp, int *bad,
{
long int i;
for ( i=0; i<n; i++ ) {
- float val = dp[i];
- if ( isnan(val) || isinf(val) ) bad[i] = 1;
+ if ( !isfinite(dp[i]) ) bad[i] = 1;
}
}