Bug 13146 - source3/torture/pdbtest.c:192: bad test ?
source3/torture/pdbtest.c:192: bad test ?
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.7.2
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-15 14:57 UTC by David Binderman
Modified: 2017-11-15 17:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2017-11-15 14:57:43 UTC
source3/torture/pdbtest.c:192:22: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]

Source code is

        d1_buf = pdb_get_hours(s1);
        d2_buf = pdb_get_hours(s2);
        if (d2_buf == NULL && d2_buf != NULL) {

Maybe better code:

        d1_buf = pdb_get_hours(s1);
        d2_buf = pdb_get_hours(s2);
        if (d1_buf == NULL && d2_buf != NULL) {