From fa33079a142ad0f00d588d73a0573339b6de6da8 Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Thu, 6 Aug 2009 11:11:15 +0000 Subject: [PATCH] - Fix CS and remove extra strlen() call --- ext/posix/posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index eda3ec4f8d..c499b54d26 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1390,7 +1390,9 @@ PHP_FUNCTION(posix_initgroups) RETURN_FALSE; } - if(strlen(name)==0) RETURN_FALSE; + if (name_len == 0) { + RETURN_FALSE; + } RETURN_BOOL(!initgroups((const char *)name, basegid)); } -- 2.50.1