summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-08-01 03:57:55 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-08-03 04:21:23 +0200
commita9c535270d1224ff0e23fa6657e52be4659cf1ff (patch)
tree100c6e2e7368226b1835385e6fda95cfd17116ac
parent2b87888e8428bd55e2b30533914f903782a0c27c (diff)
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 <ralf@linux-mips.org>
-rw-r--r--kiss/net2kiss.c19
-rw-r--r--netrom/netromr.c2
-rw-r--r--netrom/netromt.c4
-rw-r--r--tcpip/ttylinkd.c6
4 files changed, 14 insertions, 17 deletions
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';
}
}
diff --git a/netrom/netromr.c b/netrom/netromr.c
index ccf6cd2..06ec69b 100644
--- a/netrom/netromr.c
+++ b/netrom/netromr.c
@@ -183,7 +183,7 @@ void receive_nodes(unsigned char *buffer, int length, ax25_address *neighbour, i
quality = port_list[index].default_qual;
while (fgets(neigh_buffer, 90, fp) != NULL) {
- (void) strtok(neigh_buffer, " "); /* skip addr field */
+ strtok(neigh_buffer, " "); /* skip addr field */
callsign = strtok(NULL, " ");
device = strtok(NULL, " ");
qual = atoi(strtok(NULL, " "));
diff --git a/netrom/netromt.c b/netrom/netromt.c
index 4c98f43..3addc4d 100644
--- a/netrom/netromt.c
+++ b/netrom/netromt.c
@@ -127,8 +127,8 @@ static void build_others(int s, int min_obs, struct full_sockaddr_ax25 *dest, in
while (fgets(nodes_buffer, 90, fpnodes) != NULL) {
callsign = strtok(nodes_buffer, " ");
mnemonic = strtok(NULL, " ");
- (void) strtok(NULL, " "); /* skip which field */
- (void) strtok(NULL, " "); /* skip number field */
+ strtok(NULL, " "); /* skip which field */
+ strtok(NULL, " "); /* skip number field */
quality = atoi(strtok(NULL, " "));
obs_count = atoi(strtok(NULL, " "));
neigh_no = atoi(strtok(NULL, " "));
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c
index 0412597..f32499c 100644
--- a/tcpip/ttylinkd.c
+++ b/tcpip/ttylinkd.c
@@ -340,7 +340,7 @@ int main(int argc, char *argv[])
/* Now look for an invite */
msg.type = LOOK_UP;
- (void) send_control(ctl_skt, rem_addr, msg, &resp);
+ send_control(ctl_skt, rem_addr, msg, &resp);
/* The person not there? Send an announce and wake him up */
msg.type = ANNOUNCE;
@@ -675,7 +675,7 @@ static void do_talk(int skt)
if (send_sysop_data(inbuf, i) < 0)
{
strcpy(outbuf, "User closed connection.\n");
- (void) write(skt, outbuf, strlen(outbuf));
+ write(skt, outbuf, strlen(outbuf));
return;
}
}
@@ -685,7 +685,7 @@ static void do_talk(int skt)
if (i <= 0)
{
strcpy(outbuf, "User closed connection.\n");
- (void) write(skt, outbuf, strlen(outbuf));
+ write(skt, outbuf, strlen(outbuf));
return;
}
if (send_user_data(skt, outbuf, i) < 0)