Skip to content

Commit 2129022

Browse files
author
Jani Taskinen
committed
MFH: use defined values instead of plain integers
1 parent 5d0ee5b commit 2129022

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/snmp/snmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ ZEND_GET_MODULE(snmp)
184184
*/
185185
static PHP_GINIT_FUNCTION(snmp)
186186
{
187-
snmp_globals->valueretrieval = 0;
187+
snmp_globals->valueretrieval = SNMP_VALUE_LIBRARY;
188188
}
189189
/* }}} */
190190

@@ -262,7 +262,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval TSRMLS_D
262262

263263
buf[0] = 0;
264264

265-
if (SNMP_G(valueretrieval) == 0) {
265+
if (SNMP_G(valueretrieval) == SNMP_VALUE_LIBRARY) {
266266
#ifdef HAVE_NET_SNMP
267267
snprint_value(buf, sizeof(buf), vars->name, vars->name_length, vars);
268268
#else
@@ -332,7 +332,7 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval TSRMLS_D
332332
break;
333333
}
334334

335-
if (SNMP_G(valueretrieval) == 1) {
335+
if (SNMP_G(valueretrieval) == SNMP_VALUE_PLAIN) {
336336
*snmpval = *val;
337337
zval_copy_ctor(snmpval);
338338
} else {

0 commit comments

Comments
 (0)