diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-03-06 09:56:26 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-03-06 09:56:26 +0000 |
commit | 94a6fe717a42a1df8dfb29165e8bbba815484359 (patch) | |
tree | 7cb567a943651a01d04dc5a659ca28d8812d1a39 /sbin/isakmpd | |
parent | 7c3060170c11da6e722a1d336b3ad6295784bb4d (diff) |
Less ambiguous l-value usage. Noted by cedric@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index b90eb9d2345..9181d6b4547 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.29 2003/01/09 02:51:59 ho Exp $ */ +/* $OpenBSD: util.c,v 1.30 2003/03/06 09:56:25 ho Exp $ */ /* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */ /* @@ -402,7 +402,8 @@ sockaddr2text (struct sockaddr *sa, char **address, int zflag) 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]); - (*address)[j] = (++j < addrlen) ? ':' : '\0'; + (*address)[j] = (j < (addrlen - 1)) ? ':' : '\0'; + j++; } break; |