From 15a93cd40627ac68704c7e44d42585661f905ff9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 15 Jun 2020 16:23:24 -0700 Subject: [PATCH] remove allocation failure check in setPrefix The function being called here, gmalloc, now exits on allocation failure. None of setPrefix's callers can tolerate failure anyway, so this error handling seems to have been incomplete previously. --- lib/pack/ccomps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pack/ccomps.c b/lib/pack/ccomps.c index 6b295298f..fdc0279ec 100644 --- a/lib/pack/ccomps.c +++ b/lib/pack/ccomps.c @@ -175,7 +175,7 @@ setPrefix (char* pfx, int* lenp, char* buf, int buflen) if (len + 25 <= buflen) name = buf; else { - if (!(name = (char *) gmalloc(len + 25))) return NULL; + name = (char *) gmalloc(len + 25); } strcpy(name, pfx); *lenp = len; -- 2.40.0