Browse Source

lib/str: simplify Atoi()

Checking that str is non-zero is superfluous in

	(*str && *str == ' ')

0x20 is always non-zero.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt 3 years ago
parent
commit
e2fc15ae0e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/str.c

+ 1 - 1
lib/str.c

@@ -305,7 +305,7 @@ Atoi (
     CHAR16      c;
     CHAR16      c;
 
 
     // skip preceeding white space
     // skip preceeding white space
-    while (*str && *str == ' ') {
+    while (*str == ' ') {
         str += 1;
         str += 1;
     }
     }