diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-01-10 08:03:29 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-01-10 08:03:29 +0000 |
commit | 9c5c8fec9abdbefb44b14a6ff04a1ae7c1f782f5 (patch) | |
tree | 2c4aeaf3903ad928e16671e64972f4646ea442ff | |
parent | ba994442059ee96620dfd8a422e2f7ced9f64c83 (diff) |
no return after err(3), errx -> err after calloc failure
andrushock at korovino.net via dhartmei@
-rw-r--r-- | sbin/pfctl/pfctl_qstats.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sbin/pfctl/pfctl_qstats.c b/sbin/pfctl/pfctl_qstats.c index 10beb6e7085..1bb690de29c 100644 --- a/sbin/pfctl/pfctl_qstats.c +++ b/sbin/pfctl/pfctl_qstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_qstats.c,v 1.6 2003/01/10 08:00:23 henning Exp $ */ +/* $OpenBSD: pfctl_qstats.c,v 1.7 2003/01/10 08:03:28 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -151,10 +151,8 @@ pfctl_insert_altq_node(struct pf_altq_node **root, struct pf_altq_node *node; node = calloc(1, sizeof(struct pf_altq_node)); - if (node == NULL) { - errx(1, "pfctl_insert_altq_node: calloc"); - return; - } + if (node == NULL) + err(1, "pfctl_insert_altq_node: calloc"); memcpy(&node->altq, &altq, sizeof(struct pf_altq)); memcpy(&node->qstats, &qstats, sizeof(qstats)); node->next = node->children = NULL; @@ -171,10 +169,8 @@ pfctl_insert_altq_node(struct pf_altq_node **root, struct pf_altq_node *parent; parent = pfctl_find_altq_node(*root, altq.parent, altq.ifname); - if (parent == NULL) { + if (parent == NULL) errx(1, "parent %s not found", altq.parent); - return; - } if (parent->children == NULL) parent->children = node; else { @@ -276,7 +272,6 @@ print_priqstats(struct priq_classstats qstats) qstats.qlength, qstats.qlimit); } - void pfctl_free_altq_node(struct pf_altq_node *node) { |