diff src/emacs.c @ 4710:3a87551bfeb5

Fixes for a number of minor warnings issued by gcc. See xemacs-patches message <870180fe0910051206s13dca5c3j6303732e33c478f5@mail.gmail.com>.
author Jerry James <james@xemacs.org>
date Mon, 05 Oct 2009 13:07:34 -0600
parents 80cd90837ac5
children 80d74fed5399
line wrap: on
line diff
--- a/src/emacs.c	Mon Oct 05 11:08:59 2009 -0600
+++ b/src/emacs.c	Mon Oct 05 13:07:34 2009 -0600
@@ -1240,9 +1240,8 @@
 	fd = wext_retry_open (term, O_RDWR | OPEN_BINARY, 2);
 	/* Conversions are not possible yet, and printing will be in
 	   external format, so strerror() and ttyname() are OK. */
-	if (fd < 0)
+	if (fd < 0 || dup (0) < 0)
 	  fatal ("%s: %s", WEXTTEXT_TO_8_BIT (term), strerror (errno));
-	dup (0);
 	if (! isatty (0))
 	  fatal ("%s: not a tty", WEXTTEXT_TO_8_BIT (term));