]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
run-command.c: remove dead assignment in while-loop
[thirdparty/git.git] / run-command.c
index 48b9ba6d6f077e5729f3efc4c1a88ab2be508c36..b439c7974ca4b71847cb388af0b6cc5d78e63d78 100644 (file)
@@ -1019,7 +1019,7 @@ static void *run_thread(void *data)
                sigset_t mask;
                sigemptyset(&mask);
                sigaddset(&mask, SIGPIPE);
-               if (pthread_sigmask(SIG_BLOCK, &mask, NULL) < 0) {
+               if (pthread_sigmask(SIG_BLOCK, &mask, NULL)) {
                        ret = error("unable to block SIGPIPE in async thread");
                        return (void *)ret;
                }
@@ -1632,9 +1632,7 @@ static void pp_buffer_stderr(struct parallel_processes *pp,
                             const struct run_process_parallel_opts *opts,
                             int output_timeout)
 {
-       int i;
-
-       while ((i = poll(pp->pfd, opts->processes, output_timeout) < 0)) {
+       while (poll(pp->pfd, opts->processes, output_timeout) < 0) {
                if (errno == EINTR)
                        continue;
                pp_cleanup(pp, opts);
@@ -1853,7 +1851,7 @@ enum start_bg_result start_bg_command(struct child_process *cmd,
                 *
                 * We also assume that `start_command()` does not add
                 * us to the cleanup list.  And that it calls
-                * calls `child_process_clear()`.
+                * `child_process_clear()`.
                 */
                sbgr = SBGR_ERROR;
                goto done;