aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/dhcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending/dhcp.c')
-rw-r--r--toys/pending/dhcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys/pending/dhcp.c b/toys/pending/dhcp.c
index d7a43fad..0bb4ccdd 100644
--- a/toys/pending/dhcp.c
+++ b/toys/pending/dhcp.c
@@ -370,7 +370,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);
}