浏览代码

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 年之前
父节点
当前提交
e2fc15ae0e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/str.c

+ 1 - 1
lib/str.c

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