changeset 44013:da239fc7bb6c

(wait_reading_process_input): Move variables `pname' and `pnamelen' down where they are used.
author Pavel Janík <Pavel@Janik.cz>
date Mon, 18 Mar 2002 18:21:25 +0000
parents 48c58612a775
children bef79647bdab
files src/process.c
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Mon Mar 18 18:18:21 2002 +0000
+++ b/src/process.c	Mon Mar 18 18:21:25 2002 +0000
@@ -4207,8 +4207,6 @@
 	  if (check_connect && FD_ISSET (channel, &Connecting))
 	    {
 	      struct Lisp_Process *p;
-	      struct sockaddr pname;
-	      int pnamelen = sizeof(pname);
 
 	      FD_CLR (channel, &connect_wait_mask);
 	      if (--num_pending_connects < 0)
@@ -4229,16 +4227,21 @@
 		  xerrno = errno;
 	      }
 #else
-	      /* If connection failed, getpeername will fail.  */
-	      xerrno = 0;
-	      if (getpeername(channel, &pname, &pnamelen) < 0)
-		{
-		  /* Obtain connect failure code through error slippage.  */
-		  char dummy;
-		  xerrno = errno;
-		  if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
+	      {
+		struct sockaddr pname;
+		int pnamelen = sizeof(pname);
+
+		/* If connection failed, getpeername will fail.  */
+		xerrno = 0;
+		if (getpeername(channel, &pname, &pnamelen) < 0)
+		  {
+		    /* Obtain connect failure code through error slippage.  */
+		    char dummy;
 		    xerrno = errno;
-		}
+		    if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
+		      xerrno = errno;
+		  }
+	      }
 #endif
 	      if (xerrno)
 		{