diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-24 11:48:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-24 11:48:00 +0000 |
commit | cebc5f32764fac4f0948e2683dcb73f77b3acbfb (patch) | |
tree | b0099cd8472fa4f5a345cdcd6ec0a058aae37d71 /usr.sbin/ripd/rde_rib.c | |
parent | ac6d65290341e4c9e3a13e4287efc25d8e4ba282 (diff) |
Don't use inet_ntoa() twice in a printf like function. So instead of
using inet_ntoa() on the netmask use mask2prefixlen().
Diffstat (limited to 'usr.sbin/ripd/rde_rib.c')
-rw-r--r-- | usr.sbin/ripd/rde_rib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ripd/rde_rib.c b/usr.sbin/ripd/rde_rib.c index 47a79920249..a2ad9e88493 100644 --- a/usr.sbin/ripd/rde_rib.c +++ b/usr.sbin/ripd/rde_rib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_rib.c,v 1.3 2007/10/18 17:00:59 deraadt Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.4 2007/10/24 11:47:59 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -191,8 +191,8 @@ int rt_insert(struct rt_node *r) { if (RB_INSERT(rt_tree, &rt, r) != NULL) { - log_warnx("rt_insert failed for %s/%s", - inet_ntoa(r->prefix), inet_ntoa(r->netmask)); + log_warnx("rt_insert failed for %s/%u", + inet_ntoa(r->prefix), mask2prefixlen(r->netmask.s_addr)); free(r); return (-1); } @@ -204,8 +204,8 @@ int rt_remove(struct rt_node *r) { if (RB_REMOVE(rt_tree, &rt, r) == NULL) { - log_warnx("rt_remove failed for %s/%s", - inet_ntoa(r->prefix), inet_ntoa(r->netmask)); + log_warnx("rt_remove failed for %s/%u", + inet_ntoa(r->prefix), mask2prefixlen(r->netmask.s_addr)); return (-1); } |