From e76d90364210d66a54b6e62450a8060fb0e84197 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 8 Oct 2022 12:42:46 +0200 Subject: [PATCH] apps: make memeater use perror --- apps/src/memeater.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/src/memeater.c b/apps/src/memeater.c index dcd6755c..a1c26c71 100644 --- a/apps/src/memeater.c +++ b/apps/src/memeater.c @@ -15,6 +15,6 @@ int main() printf("Allocating 4 MB of memory... %lx\n", (unsigned long)allocated); sleep(1); } while ((allocated = malloc(CHUNK))); - printf("Out of memory. (errno=%d, %s)\n", errno, strerror(errno)); + perror("malloc"); printf("Press any key to restart.\n"); } \ No newline at end of file