From 4e2cbd5c77f925c2cd14e20befe1b83b1d312511 Mon Sep 17 00:00:00 2001 From: martijn Date: Thu, 21 Dec 2023 13:54:05 +0000 Subject: [PATCH] mib_init() and MIB() disappeared with mib.c, remove their declarations. MIBDECL() and MIBEND are only used inside mib.h, so move their definition in there. OK tb@ --- usr.sbin/snmpd/mib.h | 8 +++++--- usr.sbin/snmpd/snmpd.h | 6 +----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/snmpd/mib.h b/usr.sbin/snmpd/mib.h index f154099dd87..06774a9080c 100644 --- a/usr.sbin/snmpd/mib.h +++ b/usr.sbin/snmpd/mib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.h,v 1.42 2023/11/08 19:43:29 martijn Exp $ */ +/* $OpenBSD: mib.h,v 1.43 2023/12/21 13:54:05 martijn Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter @@ -19,6 +19,10 @@ #ifndef SNMPD_MIB_H #define SNMPD_MIB_H +#define MIBDECL(...) { { MIB_##__VA_ARGS__ }, \ + (sizeof((uint32_t []) { MIB_##__VA_ARGS__ }) / sizeof(uint32_t))}, #__VA_ARGS__ +#define MIBEND { { 0 } }, NULL + /* * Adding new MIBs: * - add the OID definitions below @@ -1395,6 +1399,4 @@ { MIBEND } \ } - void mib_init(void); - #endif /* SNMPD_MIB_H */ diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h index 56891e5ef45..8582abe017f 100644 --- a/usr.sbin/snmpd/snmpd.h +++ b/usr.sbin/snmpd/snmpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.h,v 1.115 2023/12/21 12:43:31 martijn Exp $ */ +/* $OpenBSD: snmpd.h,v 1.116 2023/12/21 13:54:05 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -174,10 +174,6 @@ struct privsep_fd { #define OID(...) (struct ber_oid){ { __VA_ARGS__ }, \ (sizeof((uint32_t []) { __VA_ARGS__ }) / sizeof(uint32_t)) } -#define MIBDECL(...) { { MIB_##__VA_ARGS__ }, \ - (sizeof((uint32_t []) { MIB_##__VA_ARGS__ }) / sizeof(uint32_t))}, #__VA_ARGS__ -#define MIB(...) { { MIB_##__VA_ARGS__ } }, NULL -#define MIBEND { { 0 } }, NULL /* * daemon structures -- 2.20.1