summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/hello.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/hello.c
parent9f5335e4b55dca498205858504e957335b9cf308 (diff)
Fix whitespace and other style issues.
OK claudio@
Diffstat (limited to 'usr.sbin/ldpd/hello.c')
-rw-r--r--usr.sbin/ldpd/hello.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.sbin/ldpd/hello.c b/usr.sbin/ldpd/hello.c
index 8cbdcf7642b..fff514570fd 100644
--- a/usr.sbin/ldpd/hello.c
+++ b/usr.sbin/ldpd/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.21 2013/10/15 20:13:47 renato Exp $ */
+/* $OpenBSD: hello.c,v 1.22 2013/10/15 20:21:24 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -197,19 +197,14 @@ recv_hello(struct iface *iface, struct in_addr src, char *buf, u_int16_t len)
case HELLO_LINK:
if (holdtime == 0)
holdtime = LINK_DFLT_HOLDTIME;
- if (iface->hello_holdtime < holdtime)
- adj->holdtime = iface->hello_holdtime;
- else
- adj->holdtime = holdtime;
+
+ adj->holdtime = min(iface->hello_holdtime, holdtime);
break;
case HELLO_TARGETED:
if (holdtime == 0)
holdtime = TARGETED_DFLT_HOLDTIME;
- if (tnbr->hello_holdtime < holdtime)
- adj->holdtime = tnbr->hello_holdtime;
- else
- adj->holdtime = holdtime;
- break;
+
+ adj->holdtime = min(tnbr->hello_holdtime, holdtime);
}
if (adj->holdtime != INFINITE_HOLDTIME)