Bug 13146 - source3/torture/pdbtest.c:192: bad test ?
source3/torture/pdbtest.c:192: bad test ?
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.7.2
All All
: P5 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-15 14:57 UTC by David Binderman
Modified: 2018-06-17 10:41 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) {
Comment 1 David Binderman 2018-06-15 10:09:18 UTC
Still broken some seven months later.

Not much point sending in bug reports if they get ignored.
Comment 2 Jeremy Allison 2018-06-15 23:08:24 UTC
Sorry, this is a low priority - it's in test code.

I appreciate you provided a fix here, but a better way to get attention would be to submit as a git-am format patch to samba-technical@lists.samba.org.

This is worth fixing in master, but not back-porting as a bug to current release branches.

Jeremy.
Comment 3 Björn Jacke 2018-06-17 10:41:01 UTC
but submitting a patch via Bugzilla also perfectly fine of course. For a to post to the list you would have to be subscribed, which not everybody wants to. We should definetely all watch bugzilla bugs closer.