[balsa/gtk3] Reduce scope of variables



commit 113d926b4d4f69c3408fdad171f251649de56d8b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jul 22 15:18:48 2012 -0400

    Reduce scope of variables
    
    	* libbalsa/imap/siobuf.c (sio_set_tlsclient_ssl),
    	(sio_set_tlsserver_ssl), (raw_read): reduce scope of variables.

 ChangeLog              |    5 +++++
 libbalsa/imap/siobuf.c |   12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d7896ad..cc46020 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-07-22  Peter Bloomfield
 
+	* libbalsa/imap/siobuf.c (sio_set_tlsclient_ssl),
+	(sio_set_tlsserver_ssl), (raw_read): reduce scope of variables.
+
+2012-07-22  Peter Bloomfield
+
 	* libbalsa/imap/pop3.c (parse_list_response): use sscanf field
 	limits.
 
diff --git a/libbalsa/imap/siobuf.c b/libbalsa/imap/siobuf.c
index 44a9ba3..f5f9bd1 100644
--- a/libbalsa/imap/siobuf.c
+++ b/libbalsa/imap/siobuf.c
@@ -204,12 +204,12 @@ sio_set_timeout (struct siobuf *sio, int milliseconds)
 int
 sio_set_tlsclient_ssl (struct siobuf *sio, SSL *ssl)
 {
-  int ret;
-
   assert (sio != NULL);
 
   if (ssl != NULL)
     {
+      int ret;
+
       sio->ssl = ssl;
       SSL_set_rfd (sio->ssl, sio->sdr);
       SSL_set_wfd (sio->ssl, sio->sdw);
@@ -228,12 +228,12 @@ sio_set_tlsclient_ssl (struct siobuf *sio, SSL *ssl)
 int
 sio_set_tlsserver_ssl (struct siobuf *sio, SSL *ssl)
 {
-  int ret;
-
   assert (sio != NULL);
 
   if (ssl != NULL)
     {
+      int ret;
+
       sio->ssl = ssl;
       SSL_set_rfd (sio->ssl, sio->sdr);
       SSL_set_wfd (sio->ssl, sio->sdw);
@@ -540,7 +540,7 @@ sio_mark (struct siobuf *sio)
 static int
 raw_read (struct siobuf *sio, char *buf, int len)
 {
-  int n, status;
+  int n;
   struct pollfd pollfd;
 
   assert (sio != NULL && buf != NULL && len > 0);
@@ -566,6 +566,8 @@ raw_read (struct siobuf *sio, char *buf, int len)
       errno = 0;
       while ((n = read (sio->sdr, buf, len)) < 0)
 	{
+          int status;
+
 	  if (errno == EINTR)
 	    continue;
 	  if (errno != EAGAIN)



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