aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Janík2002-03-18 18:22:37 +0000
committerPavel Janík2002-03-18 18:22:37 +0000
commit44c887be5c7dc710469e0d00d235a9270945baad (patch)
tree6bf922171fc2b543b972d945ff990902a912f599 /src
parent18f85cdd59204ec4f636cba3122e83c76b462dee (diff)
downloademacs-44c887be5c7dc710469e0d00d235a9270945baad.tar.gz
emacs-44c887be5c7dc710469e0d00d235a9270945baad.zip
(wait_reading_process_input): Move variables `pname' and `pnamelen' down
where they are used.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/process.c25
2 files changed, 17 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 304c76f687e..a4f16623cf5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12002-03-18 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 12002-03-18 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 2
3 * process.c (wait_reading_process_input): Move variables `pname'
4 and `pnamelen' down where they are used.
5
3 * bytecode.c (Fbyte_code): Discard unused computed value to 6 * bytecode.c (Fbyte_code): Discard unused computed value to
4 prevent gcc warning. 7 prevent gcc warning.
5 8
diff --git a/src/process.c b/src/process.c
index 8c4de90638c..8045ffa4067 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4207,8 +4207,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
4207 if (check_connect && FD_ISSET (channel, &Connecting)) 4207 if (check_connect && FD_ISSET (channel, &Connecting))
4208 { 4208 {
4209 struct Lisp_Process *p; 4209 struct Lisp_Process *p;
4210 struct sockaddr pname;
4211 int pnamelen = sizeof(pname);
4212 4210
4213 FD_CLR (channel, &connect_wait_mask); 4211 FD_CLR (channel, &connect_wait_mask);
4214 if (--num_pending_connects < 0) 4212 if (--num_pending_connects < 0)
@@ -4229,16 +4227,21 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
4229 xerrno = errno; 4227 xerrno = errno;
4230 } 4228 }
4231#else 4229#else
4232 /* If connection failed, getpeername will fail. */ 4230 {
4233 xerrno = 0; 4231 struct sockaddr pname;
4234 if (getpeername(channel, &pname, &pnamelen) < 0) 4232 int pnamelen = sizeof(pname);
4235 { 4233
4236 /* Obtain connect failure code through error slippage. */ 4234 /* If connection failed, getpeername will fail. */
4237 char dummy; 4235 xerrno = 0;
4238 xerrno = errno; 4236 if (getpeername(channel, &pname, &pnamelen) < 0)
4239 if (errno == ENOTCONN && read(channel, &dummy, 1) < 0) 4237 {
4238 /* Obtain connect failure code through error slippage. */
4239 char dummy;
4240 xerrno = errno; 4240 xerrno = errno;
4241 } 4241 if (errno == ENOTCONN && read(channel, &dummy, 1) < 0)
4242 xerrno = errno;
4243 }
4244 }
4242#endif 4245#endif
4243 if (xerrno) 4246 if (xerrno)
4244 { 4247 {