summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-12-16 03:32:21 +0000
committermillert <millert@openbsd.org>2014-12-16 03:32:21 +0000
commit50915c84747de194575b71dec30d49bbc7945723 (patch)
tree7f5dc4cf5589d443f10a3fa86730a4ee5d6d1262
parentinclude lock.h, needed for later headers but currently included by magic (diff)
downloadwireguard-openbsd-50915c84747de194575b71dec30d49bbc7945723.tar.xz
wireguard-openbsd-50915c84747de194575b71dec30d49bbc7945723.zip
Remove some useless casts and includes. OK deraadt@ tedu@
-rw-r--r--lib/libc/termios/tcgetpgrp.c8
-rw-r--r--lib/libc/termios/tcsetpgrp.c4
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/libc/termios/tcgetpgrp.c b/lib/libc/termios/tcgetpgrp.c
index 5c2e0efe296..a85267a9a6e 100644
--- a/lib/libc/termios/tcgetpgrp.c
+++ b/lib/libc/termios/tcgetpgrp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcgetpgrp.c,v 1.6 2013/04/17 17:40:35 tedu Exp $ */
+/* $OpenBSD: tcgetpgrp.c,v 1.7 2014/12/16 03:32:21 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,9 +28,7 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
-#include <termios.h>
#include <unistd.h>
pid_t
@@ -39,7 +37,7 @@ tcgetpgrp(int fd)
int s;
if (ioctl(fd, TIOCGPGRP, &s) < 0)
- return ((pid_t)-1);
+ return (-1);
- return ((pid_t)s);
+ return (s);
}
diff --git a/lib/libc/termios/tcsetpgrp.c b/lib/libc/termios/tcsetpgrp.c
index b10e1f40e99..2a0b722164f 100644
--- a/lib/libc/termios/tcsetpgrp.c
+++ b/lib/libc/termios/tcsetpgrp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcsetpgrp.c,v 1.7 2013/04/17 17:40:35 tedu Exp $ */
+/* $OpenBSD: tcsetpgrp.c,v 1.8 2014/12/16 03:32:21 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -28,9 +28,7 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
-#include <termios.h>
#include <unistd.h>
int