]> arthur.barton.de Git - ngircd-alex.git/commitdiff
parse: fix logical expression testing for non RFC1459 links
authorFlorian Westphal <fw@strlen.de>
Fri, 29 Apr 2011 21:15:05 +0000 (23:15 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 29 Apr 2011 21:27:56 +0000 (23:27 +0200)
parse.c:284: warning: suggest parentheses around operand of '!' or
change '&' to '&&' or '!' to '~'

The expression looks dubious, this should probably be
an if-not-set, then... test.

src/ngircd/parse.c

index d7dbffc28f951465bfc6f300173e390aa9c0b131..c2603918ff430643d045d8e5d95bdfcca43eec8f 100644 (file)
@@ -280,7 +280,7 @@ Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Closed )
        assert( client != NULL );
 
        if (!Req->prefix && Client_Type(client) == CLIENT_SERVER
        assert( client != NULL );
 
        if (!Req->prefix && Client_Type(client) == CLIENT_SERVER
-           && !Conn_Options(Idx) & CONN_RFC1459
+           && !(Conn_Options(Idx) & CONN_RFC1459)
            && strcasecmp(Req->command, "ERROR") != 0
            && strcasecmp(Req->command, "PING") != 0)
        {
            && strcasecmp(Req->command, "ERROR") != 0
            && strcasecmp(Req->command, "PING") != 0)
        {