summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2003-03-13 10:31:45 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2003-03-13 10:31:45 +0000
commit88efdbc759f31065d8399de138903a9f1a42a71f (patch)
treea3d8ab2dd12d3607ff2c1a1dd1673da612a1315a /sbin/isakmpd
parent4e04c4424f0cbd3a7b1082bb1e704c38407b6620 (diff)
Avoid "j += snprintf()". niklas@ ok.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c
index 4233356ebdf..1f595c4b736 100644
--- a/sbin/isakmpd/util.c
+++ b/sbin/isakmpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.31 2003/03/06 14:22:13 cedric Exp $ */
+/* $OpenBSD: util.c,v 1.32 2003/03/13 10:31:44 ho Exp $ */
/* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */
/*
@@ -401,9 +401,10 @@ sockaddr2text (struct sockaddr *sa, char **address, int zflag)
for (i = 0, j = 0; i < 8; i++)
{
- j += snprintf ((*address) + j, addrlen - j, "%02x%02x",
- ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[2 * i],
- ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[2 * i + 1]);
+ snprintf ((*address) + j, addrlen - j, "%02x%02x",
+ ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[2 * i],
+ ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[2 * i + 1]);
+ j += 4;
(*address)[j] = (j < (addrlen - 1)) ? ':' : '\0';
j++;
}