diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-10-21 08:17:35 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-10-21 08:17:35 +0000 |
commit | 26054e602ee150bf9297de4ab24e96120af8307f (patch) | |
tree | 39f0998b63a4342c88e043dc671df31c36b64020 /usr.sbin/snmpd/traphandler.c | |
parent | 4b79930f7a2c2fa1b4a6806f152dcb87d7ce5898 (diff) |
Sync ober_oid_cmp with ax_oid_cmp from libagentx.
This flips the returned signedness and adds the weight of 2 for
parent-child relationship in both direction.
This makes ober_oid_cmp consistent with the rest of the *_cmp based
functions.
OK tb@
Diffstat (limited to 'usr.sbin/snmpd/traphandler.c')
-rw-r--r-- | usr.sbin/snmpd/traphandler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/traphandler.c b/usr.sbin/snmpd/traphandler.c index ee7ce3c57a6..87ac8066d90 100644 --- a/usr.sbin/snmpd/traphandler.c +++ b/usr.sbin/snmpd/traphandler.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traphandler.c,v 1.21 2021/02/22 11:31:09 martijn Exp $ */ +/* $OpenBSD: traphandler.c,v 1.22 2021/10/21 08:17:34 martijn Exp $ */ /* * Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org> @@ -440,7 +440,7 @@ trapcmd_cmp(struct trapcmd *cmd1, struct trapcmd *cmd2) { int ret; - ret = ober_oid_cmp(cmd2->cmd_oid, cmd1->cmd_oid); + ret = ober_oid_cmp(cmd1->cmd_oid, cmd2->cmd_oid); switch (ret) { case 2: /* cmd1 is a child of cmd2 */ |