diff options
author | Wayne Davison <wayned@samba.org> | 2011-10-08 09:15:36 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-10-08 09:15:36 -0700 |
commit | 3527677043f5a995b6a49e318d0f029ac187a97e (patch) | |
tree | 656f9c30b833525d2903cd094d2e7f29571bf674 /clientserver.c | |
parent | fd91c3b6661dbd7453a143cad81ca08cd34b243b (diff) | |
download | android_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.c | 2 |
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; |