summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-10-01 14:51:11 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-10-01 14:51:11 +0000
commit086289983e574e1c396f57a1a2e238f899e543cd (patch)
treee7bf00acc446001748899524541aa409233d9304 /Zend/zend_ini.c
parent25be330cd045fdafabf1a42de3c4c2d5a4a546f5 (diff)
downloadphp-git-086289983e574e1c396f57a1a2e238f899e543cd.tar.gz
Refactor code to make fixes for coverity issues #385 and #386 a bit more
obvious
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r--Zend/zend_ini.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index b7ca499893..072405b40b 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -437,14 +437,16 @@ ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
tmp_value_len = 0;
}
- if (tmp_value_len == 4 && strcasecmp(tmp_value, "true") == 0) {
- value = 1;
- } else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
- value = 1;
- } else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
- value = 1;
- } else if (tmp_value) {
- value = atoi(tmp_value);
+ if (tmp_value) {
+ if (tmp_value_len == 4 && strcasecmp(tmp_value, "true") == 0) {
+ value = 1;
+ } else if (tmp_value_len == 3 && strcasecmp(tmp_value, "yes") == 0) {
+ value = 1;
+ } else if (tmp_value_len == 2 && strcasecmp(tmp_value, "on") == 0) {
+ value = 1;
+ } else (tmp_value) {
+ value = atoi(tmp_value);
+ }
} else {
value = 0;
}