texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5452] info/pseudotty.c


From: Gavin D. Smith
Subject: [5452] info/pseudotty.c
Date: Wed, 16 Apr 2014 14:02:19 +0000

Revision: 5452
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5452
Author:   gavin
Date:     2014-04-16 14:02:18 +0000 (Wed, 16 Apr 2014)
Log Message:
-----------
info/pseudotty.c

Modified Paths:
--------------
    trunk/info/pseudotty.c

Modified: trunk/info/pseudotty.c
===================================================================
--- trunk/info/pseudotty.c      2014-04-15 20:51:25 UTC (rev 5451)
+++ trunk/info/pseudotty.c      2014-04-16 14:02:18 UTC (rev 5452)
@@ -17,6 +17,7 @@
    standard output.  Read and ignore any data sent to terminal.  This
    is so we can run tests interactively without messing up the screen. */
 
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -28,12 +29,14 @@
 
 main ()
 {
-  if ((master = getpt ()) == -1)
+  master = getpt();
+  if (master == -1)
     exit (1);
 
   if (grantpt (master) < 0 || unlockpt (master) < 0)
     exit (1);
-  if (!(name = ptsname (master)))
+  name = ptsname (master);
+  if (!name)
     exit (1);
 
   slave = open (name, O_RDWR);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]