From 13caef2de0cbd781a5dda3fbff74c42470af0c13 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 1 Feb 2022 11:49:10 +0100 Subject: [PATCH] tweaks: remove two redundant checks The checks have been there for fifteen months, and no one ever reported seeing those messages. --- src/utils.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/utils.c b/src/utils.c index e5ec6337..f7fb95a1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -288,9 +288,6 @@ void *nmalloc(size_t howmuch) { void *r = malloc(howmuch); - if (howmuch == 0) - die("Allocating zero bytes. Please report a bug.\n"); - if (r == NULL) die(_("Nano is out of memory!\n")); @@ -303,9 +300,6 @@ void *nrealloc(void *ptr, size_t howmuch) { void *r = realloc(ptr, howmuch); - if (howmuch == 0) - die("Allocating zero bytes. Please report a bug.\n"); - if (r == NULL) die(_("Nano is out of memory!\n"));