aboutsummaryrefslogtreecommitdiffstats
path: root/clientserver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2011-10-08 09:15:36 -0700
committerWayne Davison <wayned@samba.org>2011-10-08 09:15:36 -0700
commit3527677043f5a995b6a49e318d0f029ac187a97e (patch)
tree656f9c30b833525d2903cd094d2e7f29571bf674 /clientserver.c
parentfd91c3b6661dbd7453a143cad81ca08cd34b243b (diff)
downloadandroid_external_rsync-3527677043f5a995b6a49e318d0f029ac187a97e.tar.gz
android_external_rsync-3527677043f5a995b6a49e318d0f029ac187a97e.tar.bz2
android_external_rsync-3527677043f5a995b6a49e318d0f029ac187a97e.zip
Let's cast getpid() to an int instead of a long for snprintf().
Diffstat (limited to 'clientserver.c')
-rw-r--r--clientserver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clientserver.c b/clientserver.c
index 52ce44fb..d63aa964 100644
--- a/clientserver.c
+++ b/clientserver.c
@@ -1121,7 +1121,7 @@ static void create_pid_file(void)
rsyserr(FLOG, errno, "failed to create pid file %s", pid_file);
exit_cleanup(RERR_FILEIO);
}
- snprintf(pidbuf, sizeof pidbuf, "%ld\n", (long)pid);
+ snprintf(pidbuf, sizeof pidbuf, "%d\n", (int)pid);
len = strlen(pidbuf);
if (write(fd, pidbuf, len) != len)
goto failure;