aboutsummaryrefslogtreecommitdiff
path: root/termios/tcgetsid.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-10-13 11:12:28 -0700
committerRoland McGrath <roland@hack.frob.com>2014-10-13 11:12:28 -0700
commit53544380266a8eb38bef9389562fba3ed58a0d11 (patch)
treed040f7c483990e8cf4bb8e11102f15c04a2f6514 /termios/tcgetsid.c
parentfcb32af153a745414b0d949e707c9485ab77d6ba (diff)
downloadglibc-roland/Wshadow.zip
glibc-roland/Wshadow.tar.gz
glibc-roland/Wshadow.tar.bz2
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 7eb96f4..f7e9c87 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);