diff options
author | Yang Tse <yangsita@gmail.com> | 2008-02-06 16:54:01 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-02-06 16:54:01 +0000 |
commit | fecb67b246a2a2dad900edaab28f4e046ef47822 (patch) | |
tree | 6e73a914a37be6dffd841aa7256de97ca17629d3 /tests/server/sockfilt.c | |
parent | 2c0956200ffe6c9a42d80a6077fe172c3f7bac53 (diff) |
Use a long int data type to handle getpid() result
Diffstat (limited to 'tests/server/sockfilt.c')
-rw-r--r-- | tests/server/sockfilt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index e5a605157..9962a4c40 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -671,10 +671,10 @@ int main(int argc, char *argv[]) pidfile = fopen(pidname, "w"); if(pidfile) { - int pid = (int)getpid(); - fprintf(pidfile, "%d\n", pid); + long pid = (long)getpid(); + fprintf(pidfile, "%ld\n", pid); fclose(pidfile); - logmsg("Wrote pid %d to %s", pid, pidname); + logmsg("Wrote pid %ld to %s", pid, pidname); } else { error = ERRNO; |