]> git.eshelyaron.com Git - emacs.git/commitdiff
(wait_reading_process_input): Move variables `pname' and `pnamelen' down
authorPavel Janík <Pavel@Janik.cz>
Mon, 18 Mar 2002 18:22:37 +0000 (18:22 +0000)
committerPavel Janík <Pavel@Janik.cz>
Mon, 18 Mar 2002 18:22:37 +0000 (18:22 +0000)
where they are used.

src/ChangeLog
src/process.c

index 304c76f687efca623d2ec627f303c1487e3ed077..a4f16623cf53c9c9efe29bb75076e8db93fe29a6 100644 (file)
@@ -1,5 +1,8 @@
 2002-03-18  Pavel Jan\e,Bm\e(Bk  <Pavel@Janik.cz>
 
+       * process.c (wait_reading_process_input): Move variables `pname'
+       and `pnamelen' down where they are used.
+
        * bytecode.c (Fbyte_code): Discard unused computed value to
        prevent gcc warning.
 
index 8c4de90638cf7ff8cbce7e416f374810b00a1196..8045ffa4067e4f27509c2f4a804aa70329e5f496 100644 (file)
@@ -4207,8 +4207,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
          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 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
                  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)
                {