Bläddra i källkod

do comparison instead of (bool) cast

Stefan Siegl 8 år sedan
förälder
incheckning
78807b6720
1 ändrade filer med 1 tillägg och 1 borttagningar
  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));
 	}
 }
 /* }}} */