[PHP-CVS] [php-src] master: snmp: use size_t type instead of int type

[email protected] (Gina Peter Banyard)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Date: 2026-08-22T14:28:38+01:00

Commit: https://github.com/php/php-src/commit/d7bfcb2ea6c4be63db2f216d7c1c628101100db2
Raw diff: https://github.com/php/php-src/commit/d7bfcb2ea6c4be63db2f216d7c1c628101100db2.diff

snmp: use size_t type instead of int type

Changed paths:
  M  ext/snmp/snmp.c


Diff:

diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 633e74a66afb..ad04718910c4 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -238,8 +238,8 @@ static void php_snmp_getvalue(struct variable_list *vars, zval *snmpval, int val
 	char sbuf[512];
 	char *buf = &(sbuf[0]);
 	char *dbuf = (char *)NULL;
-	int buflen = sizeof(sbuf) - 1;
-	int val_len = vars->val_len;
+	size_t buflen = sizeof(sbuf) - 1;
+	size_t val_len = vars->val_len;
 
 	/* use emalloc() for large values, use static array otherwise */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.