aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-03-14 00:47:41 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2026-03-14 00:47:41 +0100
commitf9bb293f31bbe16c99dfc476aa86b3fd1bd85e64 (patch)
tree197389b6be107926946df42f0b50230488b98dee
parent7b256a0a997638615754bbd08d15fdcd9b798aad (diff)
Discarded the fprintf() return values -- writing to stderr should be safe
-rw-r--r--FICS/rmalloc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/FICS/rmalloc.c b/FICS/rmalloc.c
index 0a8f46d..3e4e3ee 100644
--- a/FICS/rmalloc.c
+++ b/FICS/rmalloc.c
@@ -45,7 +45,7 @@ rmalloc(int byteSize)
malloc_count++;
if ((newptr = malloc(byteSize)) == NULL) {
- fprintf(stderr, "Out of memory in %s()!\n", __func__);
+ (void) fprintf(stderr, "Out of memory in %s()!\n", __func__);
abort();
}
@@ -60,13 +60,15 @@ rrealloc(void *ptr, int byteSize)
#endif
if (ptr == NULL) {
- fprintf(stderr, "Hoser! Null ptr passed to %s()!\n", __func__);
+ (void) fprintf(stderr, "Hoser! Null ptr passed to %s()!\n",
+ __func__);
return NULL;
} else {
void *newptr;
if ((newptr = realloc(ptr, byteSize)) == NULL) {
- fprintf(stderr, "Out of memory in %s()!\n", __func__);
+ (void) fprintf(stderr, "Out of memory in %s()!\n",
+ __func__);
abort();
}
@@ -82,7 +84,8 @@ rfree(void *ptr)
#endif
if (ptr == NULL) {
- fprintf(stderr, "Hoser! Null ptr passed to %s()!\n", __func__);
+ (void) fprintf(stderr, "Hoser! Null ptr passed to %s()!\n",
+ __func__);
} else {
free_count++;
free(ptr);