From e19f85b2d772acf4abb23f3a28b8d64c0da1a007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 25 Jul 2022 13:32:58 +0200 Subject: [PATCH] Remove accidental semicolon and fix includes --- ext/snmp/php_snmp.h | 23 ++++++++++++++++++++++- ext/snmp/snmp.c | 25 ++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h index 8e566a0f0ed7c..935d028f2d684 100644 --- a/ext/snmp/php_snmp.h +++ b/ext/snmp/php_snmp.h @@ -92,7 +92,28 @@ ZEND_END_MODULE_GLOBALS(snmp) #define SNMP_G(v) (snmp_globals.v) #endif -#define LONG_CONST(c) (zend_long) c; +#define LONG_CONST(c) (zend_long) c + +#define SNMP_VALUE_LIBRARY (0 << 0) +#define SNMP_VALUE_PLAIN (1 << 0) +#define SNMP_VALUE_OBJECT (1 << 1) + +#define PHP_SNMP_ERRNO_NOERROR 0 +#define PHP_SNMP_ERRNO_GENERIC (1 << 1) +#define PHP_SNMP_ERRNO_TIMEOUT (1 << 2) +#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 << 3) +#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 << 4) +#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 << 5) +#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 << 6) +#define PHP_SNMP_ERRNO_ANY ( \ + PHP_SNMP_ERRNO_GENERIC | \ + PHP_SNMP_ERRNO_TIMEOUT | \ + PHP_SNMP_ERRNO_ERROR_IN_REPLY | \ + PHP_SNMP_ERRNO_OID_NOT_INCREASING | \ + PHP_SNMP_ERRNO_OID_PARSING_ERROR | \ + PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \ + PHP_SNMP_ERRNO_NOERROR \ + ) #else diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 33e6da9a9a46e..299d2d8fd08c8 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -62,6 +62,8 @@ #include #include +#include "snmp_arginfo.h" + /* For net-snmp prior to 5.4 */ #ifndef HAVE_SHUTDOWN_SNMP_LOGGING extern netsnmp_log_handler *logh_head; @@ -73,12 +75,6 @@ extern netsnmp_log_handler *logh_head; } #endif -#define SNMP_VALUE_LIBRARY (0 << 0) -#define SNMP_VALUE_PLAIN (1 << 0) -#define SNMP_VALUE_OBJECT (1 << 1) - -#include "snmp_arginfo.h" - typedef struct snmp_session php_snmp_session; #define PHP_SNMP_ADD_PROPERTIES(a, b) \ @@ -91,23 +87,6 @@ typedef struct snmp_session php_snmp_session; } \ } -#define PHP_SNMP_ERRNO_NOERROR 0 -#define PHP_SNMP_ERRNO_GENERIC (1 << 1) -#define PHP_SNMP_ERRNO_TIMEOUT (1 << 2) -#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 << 3) -#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 << 4) -#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 << 5) -#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 << 6) -#define PHP_SNMP_ERRNO_ANY ( \ - PHP_SNMP_ERRNO_GENERIC | \ - PHP_SNMP_ERRNO_TIMEOUT | \ - PHP_SNMP_ERRNO_ERROR_IN_REPLY | \ - PHP_SNMP_ERRNO_OID_NOT_INCREASING | \ - PHP_SNMP_ERRNO_OID_PARSING_ERROR | \ - PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \ - PHP_SNMP_ERRNO_NOERROR \ - ) - ZEND_DECLARE_MODULE_GLOBALS(snmp) static PHP_GINIT_FUNCTION(snmp);