[Bug nptl/17058] New: trunk/nptl/tst-setuid2.c:138: possible bad if test ?

dcb314 at hotmail dot com sourceware-bugzilla@sourceware.org
Mon Jun 16 07:14:00 GMT 2014


https://sourceware.org/bugzilla/show_bug.cgi?id=17058

            Bug ID: 17058
           Summary: trunk/nptl/tst-setuid2.c:138: possible bad if test ?
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: dcb314 at hotmail dot com
                CC: drepper.fsp at gmail dot com

[trunk/nptl/tst-setuid2.c:138]: (warning) Logical disjunction always evaluates
to true: euid != 1002 || euid != 1003.

Source code is

  if (ruid != 1001 || euid != 1002 || euid != 1003)
    FAIL ("unexpected UIDs after setuid: %ld, %ld, %ld",
      (long) ruid, (long) euid, (long) suid);

Maybe better code might be

  if (ruid != 1001 || euid != 1002 || suid != 1003)
    FAIL ("unexpected UIDs after setuid: %ld, %ld, %ld",
      (long) ruid, (long) euid, (long) suid);

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list