commit 189f29ca5c8abdc06a1f66c110f2988746484f9a
parent dd8acb3ca5ee35f5d8d6c9080191b1c9d276b627
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 24 Mar 2020 18:11:55 +0100
Add error checking on input data, remove unused math.h
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shear_flux.c b/shear_flux.c
@@ -2,7 +2,6 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <math.h>
#include "arg.h"
@@ -34,6 +33,8 @@ find_flux(FILE *f)
pos_prev = pos;
vel_prev = vel;
}
+ if (i == 1)
+ err(1, "could not read input data");
return flux;
}