summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/adjacency.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2013-10-15 20:21:27 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2013-10-15 20:21:27 +0000
commitce38752c2223de9f1a89440447cd431d731e3a92 (patch)
tree444a8725545fc812f6ae50c171c8a9711dcfcc09 /usr.sbin/ldpd/adjacency.c
parent9f5335e4b55dca498205858504e957335b9cf308 (diff)
Fix whitespace and other style issues.
OK claudio@
Diffstat (limited to 'usr.sbin/ldpd/adjacency.c')
-rw-r--r--usr.sbin/ldpd/adjacency.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/adjacency.c b/usr.sbin/ldpd/adjacency.c
index 726ea5a5cea..07ac2e42fe0 100644
--- a/usr.sbin/ldpd/adjacency.c
+++ b/usr.sbin/ldpd/adjacency.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adjacency.c,v 1.2 2013/10/15 20:13:47 renato Exp $ */
+/* $OpenBSD: adjacency.c,v 1.3 2013/10/15 20:21:24 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -77,7 +77,7 @@ void
adj_del(struct adj *adj)
{
log_debug("adj_del: LSR ID %s, %s", inet_ntoa(adj->nbr->id),
- print_hello_src(&adj->source));
+ print_hello_src(&adj->source));
adj_stop_itimer(adj);
@@ -120,14 +120,18 @@ print_hello_src(struct hello_source *src)
{
static char buffer[64];
- if (src->type == HELLO_LINK)
+ switch (src->type) {
+ case HELLO_LINK:
snprintf(buffer, sizeof(buffer), "iface %s",
src->link.iface->name);
- else
+ break;
+ case HELLO_TARGETED:
snprintf(buffer, sizeof(buffer), "source %s",
inet_ntoa(src->target->addr));
+ break;
+ }
- return buffer;
+ return (buffer);
}
/* adjacency timers */