aboutsummaryrefslogtreecommitdiff
path: root/tools/100_checkdata
diff options
context:
space:
mode:
Diffstat (limited to 'tools/100_checkdata')
-rw-r--r--tools/100_checkdata/checkdata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/100_checkdata/checkdata.c b/tools/100_checkdata/checkdata.c
index eefb063..c284aa4 100644
--- a/tools/100_checkdata/checkdata.c
+++ b/tools/100_checkdata/checkdata.c
@@ -5,7 +5,7 @@ char *solver, *filename;
5 5
6static void 6static void
7run(void) { 7run(void) {
8 long long int size, result; 8 long long int size, sizeread, result;
9 char dataid[NISSY_SIZE_DATAID]; 9 char dataid[NISSY_SIZE_DATAID];
10 unsigned char *buf; 10 unsigned char *buf;
11 FILE *f; 11 FILE *f;
@@ -23,9 +23,9 @@ run(void) {
23 } 23 }
24 24
25 buf = malloc(size); 25 buf = malloc(size);
26 fread(buf, size, 1, f); 26 sizeread = fread(buf, size, 1, f);
27 fclose(f); 27 fclose(f);
28 result = nissy_checkdata(size, buf); 28 result = sizeread == 1 && nissy_checkdata(size, buf);
29 free(buf); 29 free(buf);
30 30
31 printf("checkdata %s\n", result == 0 ? "succeeded" : "failed"); 31 printf("checkdata %s\n", result == 0 ? "succeeded" : "failed");

Generated with cgit - Back to sebastiano.tronto.net