From: Matthew Fernandez Date: Sat, 26 Jun 2021 22:56:41 +0000 (-0700) Subject: remove unnecessary error handling in canontoken X-Git-Tag: 2.49.0~63^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6f0f06e731e6560cbed4f5020fb5acd1f8a3731;p=graphviz remove unnecessary error handling in canontoken The grealloc function can only return NULL when the passed in size is 0. That is not the case in this call site. --- diff --git a/lib/common/colxlate.c b/lib/common/colxlate.c index 6a7f1256d..dfa93da84 100644 --- a/lib/common/colxlate.c +++ b/lib/common/colxlate.c @@ -141,8 +141,6 @@ char *canontoken(char *str) if (len >= allocated) { allocated = len + 1 + 10; canon = grealloc(canon, allocated); - if (!canon) - return NULL; } q = canon; while ((c = *p++)) {