aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-05-09 18:00:00 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-05-09 18:00:00 +0200
commit8e931537ff13137f49de58b84898a13ed3cdeeef (patch)
tree0afa226e273dd07872516f3c780c9baeb34318aa /tools
parente261c743dea0184ca32740160b2f101325d366fd (diff)
downloadnissy-core-8e931537ff13137f49de58b84898a13ed3cdeeef.tar.gz
nissy-core-8e931537ff13137f49de58b84898a13ed3cdeeef.zip
Add wasmtest target to build script; minor fixes in tools and tests
Diffstat (limited to 'tools')
-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