https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229717

            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: [email protected]
          Reporter: [email protected]

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

Source code is

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

maybe better code

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to