소스 검색

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;
     }