From 33f309c2047d5b23a2e013d2a52238dc5e7b55b7 Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Sat, 24 Jan 2009 00:53:26 +0100 Subject: [PATCH] Print the result of, and not the address of, getpid(). --- btpd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btpd/main.c b/btpd/main.c index 60575f1..efa0e5d 100644 --- a/btpd/main.c +++ b/btpd/main.c @@ -19,7 +19,7 @@ writepid(int pidfd) { int nw; char pidtxt[100]; - nw = snprintf(pidtxt, sizeof(pidtxt), "%ld", (long)getpid); + nw = snprintf(pidtxt, sizeof(pidtxt), "%ld", (long)getpid()); ftruncate(pidfd, 0); write(pidfd, pidtxt, nw); }