Skip to content

Commit e19f85b

Browse files
committed
Remove accidental semicolon and fix includes
1 parent 9543a27 commit e19f85b

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

ext/snmp/php_snmp.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,28 @@ ZEND_END_MODULE_GLOBALS(snmp)
9292
#define SNMP_G(v) (snmp_globals.v)
9393
#endif
9494

95-
#define LONG_CONST(c) (zend_long) c;
95+
#define LONG_CONST(c) (zend_long) c
96+
97+
#define SNMP_VALUE_LIBRARY (0 << 0)
98+
#define SNMP_VALUE_PLAIN (1 << 0)
99+
#define SNMP_VALUE_OBJECT (1 << 1)
100+
101+
#define PHP_SNMP_ERRNO_NOERROR 0
102+
#define PHP_SNMP_ERRNO_GENERIC (1 << 1)
103+
#define PHP_SNMP_ERRNO_TIMEOUT (1 << 2)
104+
#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 << 3)
105+
#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 << 4)
106+
#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 << 5)
107+
#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 << 6)
108+
#define PHP_SNMP_ERRNO_ANY ( \
109+
PHP_SNMP_ERRNO_GENERIC | \
110+
PHP_SNMP_ERRNO_TIMEOUT | \
111+
PHP_SNMP_ERRNO_ERROR_IN_REPLY | \
112+
PHP_SNMP_ERRNO_OID_NOT_INCREASING | \
113+
PHP_SNMP_ERRNO_OID_PARSING_ERROR | \
114+
PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \
115+
PHP_SNMP_ERRNO_NOERROR \
116+
)
96117

97118
#else
98119

ext/snmp/snmp.c

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
#include <net-snmp/net-snmp-config.h>
6363
#include <net-snmp/net-snmp-includes.h>
6464

65+
#include "snmp_arginfo.h"
66+
6567
/* For net-snmp prior to 5.4 */
6668
#ifndef HAVE_SHUTDOWN_SNMP_LOGGING
6769
extern netsnmp_log_handler *logh_head;
@@ -73,12 +75,6 @@ extern netsnmp_log_handler *logh_head;
7375
}
7476
#endif
7577

76-
#define SNMP_VALUE_LIBRARY (0 << 0)
77-
#define SNMP_VALUE_PLAIN (1 << 0)
78-
#define SNMP_VALUE_OBJECT (1 << 1)
79-
80-
#include "snmp_arginfo.h"
81-
8278
typedef struct snmp_session php_snmp_session;
8379

8480
#define PHP_SNMP_ADD_PROPERTIES(a, b) \
@@ -91,23 +87,6 @@ typedef struct snmp_session php_snmp_session;
9187
} \
9288
}
9389

94-
#define PHP_SNMP_ERRNO_NOERROR 0
95-
#define PHP_SNMP_ERRNO_GENERIC (1 << 1)
96-
#define PHP_SNMP_ERRNO_TIMEOUT (1 << 2)
97-
#define PHP_SNMP_ERRNO_ERROR_IN_REPLY (1 << 3)
98-
#define PHP_SNMP_ERRNO_OID_NOT_INCREASING (1 << 4)
99-
#define PHP_SNMP_ERRNO_OID_PARSING_ERROR (1 << 5)
100-
#define PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES (1 << 6)
101-
#define PHP_SNMP_ERRNO_ANY ( \
102-
PHP_SNMP_ERRNO_GENERIC | \
103-
PHP_SNMP_ERRNO_TIMEOUT | \
104-
PHP_SNMP_ERRNO_ERROR_IN_REPLY | \
105-
PHP_SNMP_ERRNO_OID_NOT_INCREASING | \
106-
PHP_SNMP_ERRNO_OID_PARSING_ERROR | \
107-
PHP_SNMP_ERRNO_MULTIPLE_SET_QUERIES | \
108-
PHP_SNMP_ERRNO_NOERROR \
109-
)
110-
11190
ZEND_DECLARE_MODULE_GLOBALS(snmp)
11291
static PHP_GINIT_FUNCTION(snmp);
11392

0 commit comments

Comments
 (0)