Warning removal about unused result.

This commit is contained in:
Andrea Mazzoleni 2013-08-25 22:36:38 +02:00
parent 60d7189bdb
commit cae50bbeba

8
util.c
View file

@ -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);
}