Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2018 10:05:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229717] src/lib/libefivar/efivar-dp-parse.c:344]: (style) Redundant condition
Message-ID:  <bug-229717-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229717

            Bug ID: 229717
           Summary: src/lib/libefivar/efivar-dp-parse.c:344]: (style)
                    Redundant condition
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: dcb314@hotmail.com

src/lib/libefivar/efivar-dp-parse.c:344]: (style) Redundant condition: If '=
EXPR
=3D=3D ' '', the comparison 'EXPR !=3D 0' is always true.
[src/lib/libefivar/efivar-dp-parse.c:350]: (style) Redundant condition: If
'EXPR =3D=3D '0'', the comparison 'EXPR !=3D 0' is always true.

Source code is

  while ((*Str !=3D 0) && *Str =3D=3D ' ') {
    Str ++;
  }
  //
  // skip preceeding zeros
  //
  while ((*Str !=3D 0) && *Str =3D=3D '0') {

maybe better code

  while (*Str =3D=3D ' ') {
    Str ++;
  }
  //
  // skip preceeding zeros
  //
  while (*Str =3D=3D '0') {

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229717-227>