Skip to content

Commit 2733d9f

Browse files
committed
ext/snmp: use P specifier in SNMP::__construct
1 parent 69c7b55 commit 2733d9f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

ext/snmp/snmp.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,14 +1650,9 @@ PHP_METHOD(SNMP, __construct)
16501650

16511651
snmp_object = Z_SNMP_P(object);
16521652

1653-
ZEND_PARSE_PARAMETERS_START(3, 5)
1654-
Z_PARAM_LONG(version)
1655-
Z_PARAM_PATH_STR(a1)
1656-
Z_PARAM_PATH_STR(a2)
1657-
Z_PARAM_OPTIONAL
1658-
Z_PARAM_LONG(timeout)
1659-
Z_PARAM_LONG(retries)
1660-
ZEND_PARSE_PARAMETERS_END();
1653+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lPP|ll", &version, &a1, &a2, &timeout, &retries) == FAILURE) {
1654+
RETURN_THROWS();
1655+
}
16611656

16621657
switch (version) {
16631658
case SNMP_VERSION_1:

0 commit comments

Comments
 (0)