Cast getpid() to a long for output.
authorWayne Davison <wayned@samba.org>
Tue, 27 Jan 2004 08:02:31 +0000 (08:02 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 27 Jan 2004 08:02:31 +0000 (08:02 +0000)
generator.c
main.c

index 0a9d3f5..3dfeebf 100644 (file)
@@ -530,9 +530,10 @@ void generate_files(int f, struct file_list *flist, char *local_name)
        int phase=0;
        char fbuf[MAXPATHLEN];
 
-       if (verbose > 2)
-               rprintf(FINFO,"generator starting pid=%d count=%d\n",
-                       (int)getpid(),flist->count);
+       if (verbose > 2) {
+               rprintf(FINFO, "generator starting pid=%ld count=%d\n",
+                       (long)getpid(), flist->count);
+       }
 
        if (verbose >= 2) {
                rprintf(FINFO,
diff --git a/main.c b/main.c
index 272f8a0..7459e1e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -363,8 +363,10 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
        struct file_list *flist;
        char *dir = argv[0];
 
-       if (verbose > 2)
-               rprintf(FINFO,"server_sender starting pid=%d\n",(int)getpid());
+       if (verbose > 2) {
+               rprintf(FINFO, "server_sender starting pid=%ld\n",
+                       (long)getpid());
+       }
 
        if (!relative_paths && !push_dir(dir)) {
                rprintf(FERROR, "push_dir %s failed: %s (3)\n",
@@ -484,8 +486,10 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
        char *local_name=NULL;
        char *dir = NULL;
 
-       if (verbose > 2)
-               rprintf(FINFO,"server_recv(%d) starting pid=%d\n",argc,(int)getpid());
+       if (verbose > 2) {
+               rprintf(FINFO, "server_recv(%d) starting pid=%ld\n",
+                       argc, (long)getpid());
+       }
 
        if (am_daemon && lp_read_only(module_id) && !am_sender) {
                rprintf(FERROR,"ERROR: module is read only\n");