aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/dhcpd.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-09-03 08:16:42 -0500
committerRob Landley <rob@landley.net>2013-09-03 08:16:42 -0500
commit79d8bc70539b7a3d459630c97e38d3cdff77e591 (patch)
treeb78b399adae156ccf665dd85593c536d0e2afa9e /toys/pending/dhcpd.c
parent01f828d9d80ce2ad80e21638fece083f924318a9 (diff)
downloadtoybox-79d8bc70539b7a3d459630c97e38d3cdff77e591.tar.gz
Convert dhcp/dhcpd from utoa() to sprintf().
Diffstat (limited to 'toys/pending/dhcpd.c')
-rw-r--r--toys/pending/dhcpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c
index 18f4f25e..2a54f88c 100644
--- a/toys/pending/dhcpd.c
+++ b/toys/pending/dhcpd.c
@@ -310,7 +310,9 @@ static void write_pid(char *path)
{
int pidfile = open(path, O_CREAT | O_WRONLY | O_TRUNC, 0666);
if (pidfile > 0) {
- char *pidbuf = utoa(getpid());
+ char pidbuf[12];
+
+ sprintf(pidbuf, "%u", (unsigned)getpid());
write(pidfile, pidbuf, strlen(pidbuf));
close(pidfile);
}