From a9c535270d1224ff0e23fa6657e52be4659cf1ff Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 1 Aug 2017 03:57:55 +0200 Subject: treewide: Remove useless casts of function return value to void. Arguably useful in documenting the return value is intentionally ignored I think it's just cluttering the screen. This is using the following semantic patch: @castvoid@ expression F; @@ - (void) F + F (...) Signed-off-by: Ralf Baechle --- kiss/net2kiss.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'kiss') diff --git a/kiss/net2kiss.c b/kiss/net2kiss.c index d9e8ff5..093a191 100644 --- a/kiss/net2kiss.c +++ b/kiss/net2kiss.c @@ -252,11 +252,10 @@ static int openpty(int *amaster, int *aslave, char *name, return -1; /* out of ptys */ } else { line[5] = 't'; - (void) chown(line, getuid(), - gr ? gr->gr_gid : -1); - (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP); + chown(line, getuid(), gr ? gr->gr_gid : -1); + chmod(line, S_IRUSR|S_IWUSR|S_IWGRP); #if 0 - (void) revoke(line); + revoke(line); #endif slave = open(line, O_RDWR, 0); if (slave != -1) { @@ -265,16 +264,14 @@ static int openpty(int *amaster, int *aslave, char *name, if (name) strcpy(name, line); if (termp) - (void) tcsetattr(slave, - TCSAFLUSH, - termp); + tcsetattr(slave, TCSAFLUSH, + termp); if (winp) - (void) ioctl(slave, - TIOCSWINSZ, - (char *)winp); + ioctl(slave, TIOCSWINSZ, + (char *)winp); return 0; } - (void) close(master); + close(master); line[5] = 'p'; } } -- cgit v1.2.3