summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-01 01:33:03 +0200
committerMartin Mares <mj@ucw.cz>2000-04-01 01:33:03 +0200
commita37410cbddfadca651c795e9817f66c54374a943 (patch)
tree56794f505615a0f6f205f4f070dc343b5ae19287 /lib
parent221135d6bf256c85b4aeb08881d6262f6eaadff4 (diff)
downloadbird-a37410cbddfadca651c795e9817f66c54374a943.tar
bird-a37410cbddfadca651c795e9817f66c54374a943.zip
Use bsprintf() instead of sprintf().
Diffstat (limited to 'lib')
-rw-r--r--lib/ipv6.c16
-rw-r--r--lib/resource.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/ipv6.c b/lib/ipv6.c
index 9f49be3..b533c58 100644
--- a/lib/ipv6.c
+++ b/lib/ipv6.c
@@ -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;
}
diff --git a/lib/resource.c b/lib/resource.c
index 98bfe4e..e67c05a 100644
--- a/lib/resource.c
+++ b/lib/resource.c
@@ -90,7 +90,7 @@ rdump(void *res)
char x[16];
resource *r = res;
- sprintf(x, "%%%ds%%08x ", indent);
+ bsprintf(x, "%%%ds%%08x ", indent);
debug(x, "", (int) r);
if (r)
{