about summary refs log tree commit diff
path: root/termios/tcgetsid.c
diff options
context:
space:
mode:
Diffstat (limited to 'termios/tcgetsid.c')
-rw-r--r--termios/tcgetsid.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/termios/tcgetsid.c b/termios/tcgetsid.c
index 7eb96f4e13..f7e9c87b4c 100644
--- a/termios/tcgetsid.c
+++ b/termios/tcgetsid.c
@@ -26,8 +26,6 @@ pid_t
 tcgetsid (fd)
      int fd;
 {
-  pid_t pgrp;
-  pid_t sid;
 #ifdef TIOCGSID
   static int tiocgsid_does_not_work;
 
@@ -51,11 +49,11 @@ tcgetsid (fd)
     }
 #endif
 
-  pgrp = tcgetpgrp (fd);
+  pid_t pgrp = tcgetpgrp (fd);
   if (pgrp == -1)
     return (pid_t) -1;
 
-  sid = getsid (pgrp);
+  pid_t sid = getsid (pgrp);
   if (sid == -1 && errno == ESRCH)
     __set_errno (ENOTTY);