From d82e9b2785c0580f9a3bc09f3d3194ccaf7c50ac Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Fri, 29 Dec 2023 16:21:04 -0500 Subject: libftpconn: add out >= 2 condition to make GCC happy Message-ID: <20231229212105.858759-10-flaviocruz@gmail.com> --- libftpconn/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libftpconn') diff --git a/libftpconn/cmd.c b/libftpconn/cmd.c index 9916d03b..4b4c6fae 100644 --- a/libftpconn/cmd.c +++ b/libftpconn/cmd.c @@ -99,7 +99,7 @@ ftp_conn_cmd (struct ftp_conn *conn, const char *cmd, const char *arg, snprintf (buf, sizeof buf, arg ? "%s %s\r\n" : "%s\r\n", cmd, arg); err = _write (conn->control, buf, out); - if (!err && conn->hooks && conn->hooks->cntl_debug) + if (!err && conn->hooks && conn->hooks->cntl_debug && out >= 2) { buf[out - 2] = '\0'; /* Stomp the CR & NL. */ (* conn->hooks->cntl_debug) (conn, FTP_CONN_CNTL_DEBUG_CMD, buf); -- cgit v1.2.3