diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-04-02 07:46:04 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-04-02 07:46:04 +0000 |
commit | cd09f576e255dc3e7d25fad512ce5341308e1839 (patch) | |
tree | b6e9298096aa17871d545b483842d656da7df9b2 /sbin | |
parent | 12ac57b2b07450f17864d8cf6043fb5cec8e75cc (diff) |
Collapse case statements to a common fall through and use the passed
in type to identify the resolver now that they can be addressed by
index.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/unwind/resolver.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index aa86d79405c..53960336a73 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.33 2019/04/02 07:45:11 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.34 2019/04/02 07:46:03 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -1300,25 +1300,12 @@ show_status(enum uw_resolver_type type, pid_t pid) resolvers[STATIC_DOT_FORWARDER] == best, pid); break; case RECURSOR: - send_resolver_info(resolvers[RECURSOR], resolvers[RECURSOR] == - best, pid); - send_detailed_resolver_info(resolvers[RECURSOR], pid); - break; case FORWARDER: - send_resolver_info(resolvers[FORWARDER], resolvers[FORWARDER] - == best, pid); - send_detailed_resolver_info(resolvers[FORWARDER], pid); - break; case STATIC_FORWARDER: - send_resolver_info(resolvers[STATIC_FORWARDER], - resolvers[STATIC_FORWARDER] == best, pid); - send_detailed_resolver_info(resolvers[STATIC_FORWARDER], pid); - break; case STATIC_DOT_FORWARDER: - send_resolver_info(resolvers[STATIC_DOT_FORWARDER], - resolvers[STATIC_DOT_FORWARDER] == best, pid); - send_detailed_resolver_info(resolvers[STATIC_DOT_FORWARDER], + send_resolver_info(resolvers[type], resolvers[type] == best, pid); + send_detailed_resolver_info(resolvers[type], pid); break; default: fatalx("unknown resolver type %d", type); |