Skip to content

Commit bf13d25

Browse files
committed
Don't return explicit value on failing ZPP
1 parent 8574268 commit bf13d25

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

ext/snmp/snmp.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
13801380
if (st & SNMP_CMD_SET) {
13811381
if (zend_parse_parameters(argc, "ssssssszzz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
13821382
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
1383-
RETURN_FALSE;
1383+
return;
13841384
}
13851385
} else {
13861386
/* SNMP_CMD_GET
@@ -1389,39 +1389,39 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
13891389
*/
13901390
if (zend_parse_parameters(argc, "sssssssz|ll", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
13911391
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len, &oid, &timeout, &retries) == FAILURE) {
1392-
RETURN_FALSE;
1392+
return;
13931393
}
13941394
}
13951395
} else {
13961396
if (st & SNMP_CMD_SET) {
13971397
if (zend_parse_parameters(argc, "sszzz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &type, &value, &timeout, &retries) == FAILURE) {
1398-
RETURN_FALSE;
1398+
return;
13991399
}
14001400
} else {
14011401
/* SNMP_CMD_GET
14021402
* SNMP_CMD_GETNEXT
14031403
* SNMP_CMD_WALK
14041404
*/
14051405
if (zend_parse_parameters(argc, "ssz|ll", &a1, &a1_len, &a2, &a2_len, &oid, &timeout, &retries) == FAILURE) {
1406-
RETURN_FALSE;
1406+
return;
14071407
}
14081408
}
14091409
}
14101410
} else {
14111411
if (st & SNMP_CMD_SET) {
14121412
if (zend_parse_parameters(argc, "zzz", &oid, &type, &value) == FAILURE) {
1413-
RETURN_FALSE;
1413+
return;
14141414
}
14151415
} else if (st & SNMP_CMD_WALK) {
14161416
if (zend_parse_parameters(argc, "z|bll", &oid, &suffix_keys, &(objid_query.max_repetitions), &(objid_query.non_repeaters)) == FAILURE) {
1417-
RETURN_FALSE;
1417+
return;
14181418
}
14191419
if (suffix_keys) {
14201420
st |= SNMP_USE_SUFFIX_AS_KEYS;
14211421
}
14221422
} else if (st & SNMP_CMD_GET) {
14231423
if (zend_parse_parameters(argc, "z|b", &oid, &use_orignames) == FAILURE) {
1424-
RETURN_FALSE;
1424+
return;
14251425
}
14261426
if (use_orignames) {
14271427
st |= SNMP_ORIGINAL_NAMES_AS_KEYS;
@@ -1430,7 +1430,7 @@ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version)
14301430
/* SNMP_CMD_GETNEXT
14311431
*/
14321432
if (zend_parse_parameters(argc, "z", &oid) == FAILURE) {
1433-
RETURN_FALSE;
1433+
return;
14341434
}
14351435
}
14361436
}
@@ -1554,7 +1554,7 @@ PHP_FUNCTION(snmp_set_quick_print)
15541554
zend_long a1;
15551555

15561556
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
1557-
RETURN_FALSE;
1557+
return;
15581558
}
15591559

15601560
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, (int)a1);
@@ -1569,7 +1569,7 @@ PHP_FUNCTION(snmp_set_enum_print)
15691569
zend_long a1;
15701570

15711571
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
1572-
RETURN_FALSE;
1572+
return;
15731573
}
15741574

15751575
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, (int) a1);
@@ -1584,7 +1584,7 @@ PHP_FUNCTION(snmp_set_oid_output_format)
15841584
zend_long a1;
15851585

15861586
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) {
1587-
RETURN_FALSE;
1587+
return;
15881588
}
15891589

15901590
switch((int) a1) {
@@ -1692,7 +1692,7 @@ PHP_FUNCTION(snmp_set_valueretrieval)
16921692
zend_long method;
16931693

16941694
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &method) == FAILURE) {
1695-
RETURN_FALSE;
1695+
return;
16961696
}
16971697

16981698
if (method >= 0 && method <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) {
@@ -1710,7 +1710,7 @@ PHP_FUNCTION(snmp_set_valueretrieval)
17101710
PHP_FUNCTION(snmp_get_valueretrieval)
17111711
{
17121712
if (zend_parse_parameters_none() == FAILURE) {
1713-
RETURN_FALSE;
1713+
return;
17141714
}
17151715

17161716
RETURN_LONG(SNMP_G(valueretrieval));
@@ -1725,7 +1725,7 @@ PHP_FUNCTION(snmp_read_mib)
17251725
size_t filename_len;
17261726

17271727
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
1728-
RETURN_FALSE;
1728+
return;
17291729
}
17301730

17311731
if (!read_mib(filename)) {
@@ -1794,7 +1794,7 @@ PHP_METHOD(snmp, close)
17941794
snmp_object = Z_SNMP_P(object);
17951795

17961796
if (zend_parse_parameters_none() == FAILURE) {
1797-
RETURN_FALSE;
1797+
return;
17981798
}
17991799

18001800
netsnmp_session_free(&(snmp_object->session));
@@ -1849,7 +1849,7 @@ PHP_METHOD(snmp, setSecurity)
18491849

18501850
if (zend_parse_parameters(argc, "s|ssssss", &a1, &a1_len, &a2, &a2_len, &a3, &a3_len,
18511851
&a4, &a4_len, &a5, &a5_len, &a6, &a6_len, &a7, &a7_len) == FAILURE) {
1852-
RETURN_FALSE;
1852+
return;
18531853
}
18541854

18551855
if (netsnmp_session_set_security(snmp_object->session, a1, a2, a3, a4, a5, a6, a7)) {
@@ -1870,7 +1870,7 @@ PHP_METHOD(snmp, getErrno)
18701870
snmp_object = Z_SNMP_P(object);
18711871

18721872
if (zend_parse_parameters_none() == FAILURE) {
1873-
RETURN_FALSE;
1873+
return;
18741874
}
18751875

18761876
RETVAL_LONG(snmp_object->snmp_errno);
@@ -1888,7 +1888,7 @@ PHP_METHOD(snmp, getError)
18881888
snmp_object = Z_SNMP_P(object);
18891889

18901890
if (zend_parse_parameters_none() == FAILURE) {
1891-
RETURN_FALSE;
1891+
return;
18921892
}
18931893

18941894
RETURN_STRING(snmp_object->snmp_errstr);

0 commit comments

Comments
 (0)