Fix various problems with unchecked return values from syscalls.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2014-11-27 00:12:07 +01:00
1 parent 0701b688fd
commit 5d184794b4
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -344,7 +344,7 @@ int main(void)
if (fexist(files[i + 2])) if (fexist(files[i + 2]))
fprintf(stderr, "OK => %s\n", files[i + 2]); fprintf(stderr, "OK => %s\n", files[i + 2]);
remove(files[i + 2]); erase(files[i + 2]);
i += 3; i += 3;
} }
@@ -358,7 +358,7 @@ int main(void)
if (fexist(files[i + 2])) if (fexist(files[i + 2]))
fprintf(stderr, "OK => %s\n", files[i + 2]); fprintf(stderr, "OK => %s\n", files[i + 2]);
remove(files[i + 2]); erase(files[i + 2]);
i += 3; i += 3;
} }
+2 -2
View File
@@ -142,13 +142,13 @@ int simulate_files(int creat)
if (creat) if (creat)
touch(files[i]); touch(files[i]);
else else
remove(files[i]); erase(files[i]);
} }
if (creat) if (creat)
symlink("config2.cfg", STARTUP_CONFIG); symlink("config2.cfg", STARTUP_CONFIG);
else else
remove(STARTUP_CONFIG); erase(STARTUP_CONFIG);
return 0; return 0;
} }