diff options
Diffstat (limited to 'ext/snmp/snmp.c')
-rw-r--r-- | ext/snmp/snmp.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 6b635b196a..56c87e4dc4 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -402,6 +402,9 @@ PHP_FUNCTION(snmprealwalk) Return the current status of quick_print */ PHP_FUNCTION(snmp_get_quick_print) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE) + return; + RETURN_LONG(snmp_get_quick_print() ? 1 : 0); } /* }}} */ @@ -410,12 +413,12 @@ PHP_FUNCTION(snmp_get_quick_print) Return all objects including their respective object id withing the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - zval **a1; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a1) == FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_long_ex(a1); - snmp_set_quick_print((int)(*a1)->value.lval); + int argc = ZEND_NUM_ARGS(); + long a1; + + if (zend_parse_parameters(argc, "l", &a1) == FAILURE) + return; + snmp_set_quick_print((int)a1); } /* }}} */ |