bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix compiler warnings in hurd/libftpconn


From: Flavio Cruz
Subject: [PATCH] fix compiler warnings in hurd/libftpconn
Date: Tue, 29 Dec 2015 22:45:01 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

---

libftpconn: Fix compiler warnings.

* libftpconn/cmd.c (ftp_conn_abort): Remove err variable.
* libftpconn/reply.c (ftp_conn_get_raw_reply): Initialize l and len.

diff --git a/libftpconn/cmd.c b/libftpconn/cmd.c
index 803dda7..9916d03 100644
--- a/libftpconn/cmd.c
+++ b/libftpconn/cmd.c
@@ -156,9 +156,8 @@ ftp_conn_abort (struct ftp_conn *conn)
          && write (conn->control, abor, sizeof abor) == sizeof abor)
        {
          int reply;
-         error_t err;
          do
-           err = ftp_conn_get_raw_reply (conn, &reply, 0);
+           ftp_conn_get_raw_reply (conn, &reply, 0);
          while (reply == REPLY_ABORTED);
          if (reply != REPLY_TRANS_OK && reply != REPLY_ABORT_OK)
            ftp_conn_close (conn);
diff --git a/libftpconn/reply.c b/libftpconn/reply.c
index d39cdb0..a3eb4cf 100644
--- a/libftpconn/reply.c
+++ b/libftpconn/reply.c
@@ -151,8 +151,8 @@ ftp_conn_get_raw_reply (struct ftp_conn *conn, int *reply,
 
   do
     {
-      const char *l;
-      size_t len;
+      const char *l = NULL;
+      size_t len = 0;
       error_t err = ftp_conn_getline (conn, &l, &len);
 
       if (err)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]