improved error handling again. Now we report messages for the remote
[rsync/rsync.git] / util.c
diff --git a/util.c b/util.c
index 1752fae..d917f07 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1,6 +1,7 @@
-/* 
-   Copyright (C) Andrew Tridgell 1996
-   Copyright (C) Paul Mackerras 1996
+/*  -*- c-file-style: "linux" -*-
+    
+    Copyright (C) 1996-2000 by Andrew Tridgell 
+    Copyright (C) Paul Mackerras 1996
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -92,9 +93,9 @@ int fd_pair(int fd[2])
    used to cope with badly broken rsh implementations like the one on
    solaris.
  */
-int piped_child(char **command,int *f_in,int *f_out)
+pid_t piped_child(char **command,int *f_in,int *f_out)
 {
-  int pid;
+  pid_t pid;
   int to_child_pipe[2];
   int from_child_pipe[2];
   extern int blocking_io;
@@ -107,7 +108,7 @@ int piped_child(char **command,int *f_in,int *f_out)
 
 
   pid = do_fork();
-  if (pid < 0) {
+  if (pid == -1) {
     rprintf(FERROR,"fork: %s\n",strerror(errno));
     exit_cleanup(RERR_IPC);
   }
@@ -147,9 +148,9 @@ int piped_child(char **command,int *f_in,int *f_out)
   return pid;
 }
 
-int local_child(int argc, char **argv,int *f_in,int *f_out)
+pid_t local_child(int argc, char **argv,int *f_in,int *f_out)
 {
-       int pid;
+       pid_t pid;
        int to_child_pipe[2];
        int from_child_pipe[2];
 
@@ -161,7 +162,7 @@ int local_child(int argc, char **argv,int *f_in,int *f_out)
 
 
        pid = do_fork();
-       if (pid < 0) {
+       if (pid == -1) {
                rprintf(FERROR,"fork: %s\n",strerror(errno));
                exit_cleanup(RERR_IPC);
        }
@@ -963,7 +964,6 @@ void msleep(int t)
  *******************************************************************/
 int cmp_modtime(time_t file1, time_t file2)
 {
-       time_t diff;
        extern int modify_window;
 
        if (file2 > file1) {