Skip to content

Commit 5c6c3f5

Browse files
committed
ext/snmp: make objid_mib const
1 parent 75eeda1 commit 5c6c3f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/snmp/snmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ZEND_DECLARE_MODULE_GLOBALS(snmp)
9191
static PHP_GINIT_FUNCTION(snmp);
9292

9393
/* constant - can be shared among threads */
94-
static oid objid_mib[] = {1, 3, 6, 1, 2, 1};
94+
static const oid objid_mib[] = {1, 3, 6, 1, 2, 1};
9595

9696
/* Handlers */
9797
static zend_object_handlers php_snmp_object_handlers;
@@ -765,7 +765,7 @@ static bool php_snmp_parse_oid(
765765
return false;
766766
}
767767
} else {
768-
memmove((char *)objid_query->vars[0].name, (char *)objid_mib, sizeof(objid_mib));
768+
memmove((char *)objid_query->vars[0].name, (const char *)objid_mib, sizeof(objid_mib));
769769
objid_query->vars[0].name_length = sizeof(objid_mib) / sizeof(oid);
770770
}
771771
} else {

0 commit comments

Comments
 (0)