Free a strdup() in do_cmd() that checker was complaining about.
[rsync/rsync.git] / io.c
diff --git a/io.c b/io.c
index 2c162a6..d142a1a 100644 (file)
--- a/io.c
+++ b/io.c
@@ -776,7 +776,7 @@ static char *perform_io(size_t needed, int flags)
                        iobuf.in.len += n;
                }
 
-               if (iobuf.out_fd >= 0 && FD_ISSET(iobuf.out_fd, &w_fds)) {
+               if (out && FD_ISSET(iobuf.out_fd, &w_fds)) {
                        size_t len = iobuf.raw_flushing_ends_before ? iobuf.raw_flushing_ends_before - out->pos : out->len;
                        int n;
 
@@ -1534,7 +1534,7 @@ static void read_a_msg(void)
                        goto invalid_msg;
                iobuf.in_multiplexed = 1;
                if (DEBUG_GTE(EXIT, 3))
-                       rprintf(FINFO, "[%s] got MSG_ERROR_EXIT with %d bytes\n", who_am_i(), msg_bytes);
+                       rprintf(FINFO, "[%s] got MSG_ERROR_EXIT with %ld bytes\n", who_am_i(), (long)msg_bytes);
                if (msg_bytes == 0) {
                        if (!am_sender && !am_generator) {
                                if (DEBUG_GTE(EXIT, 3)) {