mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Warning removal about unused result.
This commit is contained in:
parent
60d7189bdb
commit
cae50bbeba
1 changed files with 6 additions and 2 deletions
8
util.c
8
util.c
|
|
@ -1302,7 +1302,9 @@ void* malloc_nofail(size_t size)
|
|||
|
||||
if (!ptr) {
|
||||
/* don't use printf to avoid any possible extra allocation */
|
||||
write(2, "Low Memory\n", 11);
|
||||
if (write(2, "Low Memory\n", 11) != 11) {
|
||||
/* ignore error */
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
@ -1350,7 +1352,9 @@ char* strdup_nofail(const char* str)
|
|||
|
||||
if (!ptr) {
|
||||
/* don't use printf to avoid any possible extra allocation */
|
||||
write(2, "Low Memory\n", 11);
|
||||
if (write(2, "Low Memory\n", 11) != 11) {
|
||||
/* ignore error */
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue