summaryrefslogtreecommitdiff
path: root/src/tty.c
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2018-04-06 11:22:26 +0200
committerAmadeusz Sławiński <amade@asmblr.net>2018-04-07 13:29:11 +0200
commit60e19ab26ebbc925485daf5c932de66d557c3f88 (patch)
tree5bba55ae324e233aba4aeb4d7b95bb4e66228748 /src/tty.c
parent12aed9c422ac7c4e83e353f2a4437e0532311e82 (diff)
downloadscreen-60e19ab26ebbc925485daf5c932de66d557c3f88.tar.gz
get rid of (sometype *)0 casts
using NULL makes it clear enough what's going on
Diffstat (limited to 'src/tty.c')
-rw-r--r--src/tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tty.c b/src/tty.c
index fc5f12e..39636bf 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -124,7 +124,7 @@ int OpenTTY(char *line, char *opt)
*/
#ifdef TIOCEXCL
errno = 0;
- if (ioctl(f, TIOCEXCL, (char *)0) < 0)
+ if (ioctl(f, TIOCEXCL, NULL) < 0)
Msg(errno, "%s: ioctl TIOCEXCL failed", line);
#endif /* TIOCEXCL */
/*
@@ -658,7 +658,7 @@ static void DoSendBreak(int fd, int n, int type)
* perform long breaks. But for SOLARIS, this is not true, of course.
*/
for (int i = 0; i < n; i++)
- if (ioctl(fd, TCSBRK, (char *)0) < 0) {
+ if (ioctl(fd, TCSBRK, NULL) < 0) {
Msg(errno, "Cannot send BREAK (TCSBRK)");
return;
}
@@ -673,12 +673,12 @@ static void DoSendBreak(int fd, int n, int type)
* This is very rude. Screen actively celebrates the break.
* But it may be the only save way to issue long breaks.
*/
- if (ioctl(fd, TIOCSBRK, (char *)0) < 0) {
+ if (ioctl(fd, TIOCSBRK, NULL) < 0) {
Msg(errno, "Can't send BREAK (TIOCSBRK)");
return;
}
usleep(1000 * (n ? n * 250 : 250));
- if (ioctl(fd, TIOCCBRK, (char *)0) < 0) {
+ if (ioctl(fd, TIOCCBRK, NULL) < 0) {
Msg(errno, "BREAK stuck!!! -- HELP! (TIOCCBRK)");
return;
}