From: Ilia Alshanetsky Date: Mon, 26 Apr 2004 20:14:11 +0000 (+0000) Subject: Removed pointless check. X-Git-Tag: RELEASE_0_1~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7d225fda8e30190ab8bfe7804afe51273881a8d;p=php Removed pointless check. --- diff --git a/ext/yp/yp.c b/ext/yp/yp.c index 2a312a4d4a..d8979a4bd5 100644 --- a/ext/yp/yp.c +++ b/ext/yp/yp.c @@ -297,13 +297,9 @@ static int php_foreach_cat (int instatus, char *inkey, int inkeylen, char *inval { if (inkeylen) { char *key = emalloc(inkeylen+1); - if(key) { - strlcpy(key, inkey, inkeylen+1); - add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); - efree(key); - } else { - php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()", inkeylen+1); - } + strlcpy(key, inkey, inkeylen+1); + add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); + efree(key); } return 0;