diff options
author | Martin Mares <mj@ucw.cz> | 2000-03-31 23:33:03 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-03-31 23:33:03 +0000 |
commit | a37410cbddfadca651c795e9817f66c54374a943 (patch) | |
tree | 56794f505615a0f6f205f4f070dc343b5ae19287 /lib/ipv6.c | |
parent | 221135d6bf256c85b4aeb08881d6262f6eaadff4 (diff) |
Use bsprintf() instead of sprintf().
Diffstat (limited to 'lib/ipv6.c')
-rw-r--r-- | lib/ipv6.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -167,12 +167,12 @@ ip_ntop(ip_addr a, char *b) bestlen == 6)) { u32 x = a.addr[3]; - b += sprintf(b, "::%s%d.%d.%d.%d", - a.addr[2] ? "ffff:" : "", - ((x >> 24) & 0xff), - ((x >> 16) & 0xff), - ((x >> 8) & 0xff), - (x & 0xff)); + b += bsprintf(b, "::%s%d.%d.%d.%d", + a.addr[2] ? "ffff:" : "", + ((x >> 24) & 0xff), + ((x >> 16) & 0xff), + ((x >> 8) & 0xff), + (x & 0xff)); return b; } @@ -190,7 +190,7 @@ ip_ntop(ip_addr a, char *b) { if (i) *b++ = ':'; - b += sprintf(b, "%x", words[i]); + b += bsprintf(b, "%x", words[i]); } } *b = 0; @@ -206,7 +206,7 @@ ip_ntox(ip_addr a, char *b) { if (i) *b++ = '.'; - b += sprintf(b, "%08x", a.addr[i]); + b += bsprintf(b, "%08x", a.addr[i]); } return b; } |