mirror of
https://github.com/troglobit/libite.git
synced 2026-11-07 16:01:01 +00:00
Fix various problems with unchecked return values from syscalls.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
0701b688fd
commit
5d184794b4
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user