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.
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)
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)
{