On Tue, 12 Dec 2006, Max Laier wrote:
On Tuesday 12 December 2006 13:22, Bjoern A. Zeeb wrote:
+ }
+ *cp = digits[*d & 0xf];
+ if (zero == 0 || (*cp != '0'))
+ cp++;
This last if is redundant as we check for "(u_int16_t)0" at the very
begining. If we didn't, you should still get rid of the if-check here as
we might otherwise have more than one "::" in the address.
*cp++ = ':';
a++;
}
ok looks like
..
}
*cp++ = digits[*d & 0xf];
*cp++ = ':';
a++;
}
now.
And I have run some tests (in case someone wants to check):
http://sources.zabbadoz.net/freebsd/ipv6/ip6_sprintf.c
Thanks.
--
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"