NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50954: src/usr.sbin/rpc.lockd/test.c:41]: (style) Suspicious condition



>Number:         50954
>Category:       bin
>Synopsis:       src/usr.sbin/rpc.lockd/test.c:41]: (style) Suspicious condition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 11 17:35:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160311
>Organization:
>Environment:
>Description:
src/usr.sbin/rpc.lockd/test.c:41]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.


Source code is

   if (st = clnt_call(clnt, NLM_LOCK, xdr_nlm_lockargs, argp, xdr_nlm_res,
        &res, TIMEOUT) != RPC_SUCCESS) {



Maybe better code

  
   if ((st = clnt_call(clnt, NLM_LOCK, xdr_nlm_lockargs, argp, xdr_nlm_res,
        &res, TIMEOUT)) != RPC_SUCCESS) {



 


   

  



>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index