소스 검색

do comparison instead of (bool) cast

Stefan Siegl 8 년 전
부모
커밋
78807b6720
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      v8js.cc

+ 1 - 1
v8js.cc

@@ -77,7 +77,7 @@ static bool v8js_ini_to_bool(const zend_string *new_value) /* {{{ */
 	} else if (ZSTR_LEN(new_value) == 4 && strcasecmp("true", ZSTR_VAL(new_value)) == 0) {
 		return true;
 	} else {
-		return (bool) atoi(ZSTR_VAL(new_value));
+		return 0 != atoi(ZSTR_VAL(new_value));
 	}
 }
 /* }}} */