]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ext_unix_group_acl: remove useless check for NULL
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 11 Jan 2013 06:31:01 +0000 (23:31 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 11 Jan 2013 06:31:01 +0000 (23:31 -0700)
* the string in p is checked for NULL prior to being assigned to user
  there is no need to check it twice and doing so confuses Coverity.

 Detected by Coverity Scan. Issue 740451.

helpers/external_acl/unix_group/check_group.cc

index e0cd04b64e9ed4bce9501adb533d6e599cfd0f97..769750cce2b43b104cea85d08a519233309be53c 100644 (file)
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
         } else {
             user = p;
             rfc1738_unescape(user);
-            if (user && strip_dm) {
+            if (strip_dm) {
                 suser = strchr(user, '\\');
                 if (!suser) suser = strchr(user, '/');
                 if (suser && suser[1]) user = suser + 1;