summaryrefslogtreecommitdiff
path: root/libc/termios/tcgetpgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/termios/tcgetpgrp.c')
-rw-r--r--libc/termios/tcgetpgrp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/termios/tcgetpgrp.c b/libc/termios/tcgetpgrp.c
index 241670770..1ad317139 100644
--- a/libc/termios/tcgetpgrp.c
+++ b/libc/termios/tcgetpgrp.c
@@ -27,10 +27,10 @@ libc_hidden_proto(ioctl)
/* Return the foreground process group ID of FD. */
pid_t tcgetpgrp (int fd)
{
- int pgrp;
+ pid_t pgrp;
if (ioctl (fd, TIOCGPGRP, &pgrp) < 0)
- return (pid_t) -1;
- return (pid_t) pgrp;
+ return -1;
+ return pgrp;
}
libc_hidden_def (tcgetpgrp)