From: martijn Date: Sun, 12 Nov 2023 20:06:53 +0000 (+0000) Subject: Let MIBDECL() make use of OID(). This gives use bo_n for free and we X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=103df5679b00b1d6488ffb2905ea9fcd83be2d3e;p=openbsd Let MIBDECL() make use of OID(). This gives use bo_n for free and we won't have to rely on error-prone smi_oidlen. OK tb@ --- diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h index 461ef2f20c7..6b03e7c9694 100644 --- a/usr.sbin/snmpd/snmpd.h +++ b/usr.sbin/snmpd/snmpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.h,v 1.110 2023/11/12 20:04:35 martijn Exp $ */ +/* $OpenBSD: snmpd.h,v 1.111 2023/11/12 20:06:53 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter @@ -217,7 +217,7 @@ struct oid { #define OID(...) (struct ber_oid){ { __VA_ARGS__ }, \ (sizeof((uint32_t []) { __VA_ARGS__ }) / sizeof(uint32_t)) } -#define MIBDECL(...) { { MIB_##__VA_ARGS__ } }, #__VA_ARGS__ +#define MIBDECL(...) OID(MIB_##__VA_ARGS__), #__VA_ARGS__ #define MIB(...) { { MIB_##__VA_ARGS__ } }, NULL #define MIBEND { { 0 } }, NULL