nsswitch: Cleanup code in parse_wbinfo_domain_user().
authorAndreas Schneider <asn@samba.org>
Thu, 6 Dec 2012 14:14:07 +0000 (15:14 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 12 Dec 2012 14:00:02 +0000 (15:00 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
nsswitch/wbinfo.c

index 0e102dc8582788023e14ca7101feafe7ebc1a81f..b96b73c2bfa5c037577c781d7045fefe20b1aa86 100644 (file)
@@ -121,7 +121,8 @@ static bool parse_wbinfo_domain_user(const char *domuser, fstring domain,
 
        if (!p) {
                /* Maybe it was a UPN? */
-               if ((p = strchr(domuser, '@')) != NULL) {
+               p = strchr(domuser, '@');
+               if (p != NULL) {
                        fstrcpy(domain, "");
                        fstrcpy(user, domuser);
                        return true;