tAdd error checking on input data, remove unused math.h - cngf-pf - continuum m… | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 189f29ca5c8abdc06a1f66c110f2988746484f9a | |
parent dd8acb3ca5ee35f5d8d6c9080191b1c9d276b627 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 24 Mar 2020 18:11:55 +0100 | |
Add error checking on input data, remove unused math.h | |
Diffstat: | |
M shear_flux.c | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/shear_flux.c b/shear_flux.c | |
t@@ -2,7 +2,6 @@ | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
-#include <math.h> | |
#include "arg.h" | |
t@@ -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; | |
} |