Code

git-send-email: Don't set author_not_sender from Cc: lines
[git.git] / connect.c
index 4422a0d8d38c225c6c4716ce8ff826bc1acbd981..7a6a73f2a333d067c5a5442004f76ebbb9aaed17 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -10,7 +10,7 @@
 #include <netdb.h>
 #include <signal.h>
 
-static char *server_capabilities = NULL;
+static char *server_capabilities;
 
 static int check_ref(const char *name, int len, unsigned int flags)
 {
@@ -493,8 +493,8 @@ static void git_tcp_connect(int fd[2], char *host)
 }
 
 
-static char *git_proxy_command = NULL;
-static const char *rhost_name = NULL;
+static char *git_proxy_command;
+static const char *rhost_name;
 static int rhost_len;
 
 static int git_proxy_command_options(const char *var, const char *value)
@@ -737,14 +737,9 @@ int git_connect(int fd[2], char *url, const char *prog)
 
 int finish_connect(pid_t pid)
 {
-       int ret;
-
-       for (;;) {
-               ret = waitpid(pid, NULL, 0);
-               if (!ret)
-                       break;
+       while (waitpid(pid, NULL, 0) < 0) {
                if (errno != EINTR)
-                       break;
+                       return -1;
        }
-       return ret;
+       return 0;
 }