All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
@ 2018-03-05 10:31 dcb
  2018-03-05 11:22 ` Christian Borntraeger
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: dcb @ 2018-03-05 10:31 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

qemu/pc-bios/s390-ccw/libc.c:82]: (style) Unsigned variable 'num_idx'
can't be negative so it is unnecessary to test it.

Source code is


    while (num_idx >= 0) {

but

    size_t num_idx = 1; /* account for NUL */

So there is no escape from the while loop.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437

Title:
  qemu/pc-bios/s390-ccw/libc.c:82: bad test ?

Status in QEMU:
  New

Bug description:
  qemu/pc-bios/s390-ccw/libc.c:82]: (style) Unsigned variable 'num_idx'
  can't be negative so it is unnecessary to test it.

  Source code is

  
      while (num_idx >= 0) {

  but

      size_t num_idx = 1; /* account for NUL */

  So there is no escape from the while loop.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-15  7:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
2018-03-05 11:22 ` Christian Borntraeger
2018-03-05 14:53   ` Thomas Huth
2018-03-05 15:30     ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2018-03-12  6:42 ` [Qemu-devel] [Bug 1753437] " Thomas Huth
2018-04-13 15:47 ` [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned Thomas Huth
2018-05-04 14:00 ` Thomas Huth
2018-08-15  7:28 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.