summaryrefslogtreecommitdiffstats
path: root/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-08-01 03:09:11 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-08-03 04:21:23 +0200
commit5e1dd90d814c46ad3ef41053cf7ca3bac6c80466 (patch)
treef710155614df1195e5c405986c554b5820ccd871 /ax25
parent3ee1ebc7eebcbde2c47c4a92d9a400b172f32d91 (diff)
treewide: Remove useless casts from memset pointer argument.
This is using the following semantic patch: @memset@ type T; expression A, B, C; @@ - memset((T *)A, B, C) + memset(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25')
-rw-r--r--ax25/axgetput/axgetput.c2
-rw-r--r--ax25/axspawn.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/ax25/axgetput/axgetput.c b/ax25/axgetput/axgetput.c
index 1e2a48c..e3a0c71 100644
--- a/ax25/axgetput/axgetput.c
+++ b/ax25/axgetput/axgetput.c
@@ -71,7 +71,7 @@ static void set_tty_flags(void)
/* make tty 8bit clean */
if (tcgetattr(fdin, &prev_termios) != -1)
prev_termios_stored = 1;
- memset((char *) &termios, 0, sizeof(termios));
+ memset(&termios, 0, sizeof(termios));
termios.c_iflag = IGNBRK | IGNPAR;
termios.c_oflag = 0;
termios.c_cflag = CBAUD | CS8 | CREAD | CLOCAL;
diff --git a/ax25/axspawn.c b/ax25/axspawn.c
index 60fc836..3308a70 100644
--- a/ax25/axspawn.c
+++ b/ax25/axspawn.c
@@ -672,7 +672,7 @@ static int read_ax25(char *s, int size)
sprintf(buffer,"\r//COMP 1\r");
write_ax25(buffer, strlen(buffer), 1);
sleep(1);
- memset((char *) &termios, 0, sizeof(termios));
+ memset(&termios, 0, sizeof(termios));
termios.c_iflag = ICRNL | IXOFF | IGNBRK;
termios.c_oflag = 0;
termios.c_cflag = CS8 | CREAD | CLOCAL;
@@ -691,7 +691,7 @@ static int read_ax25(char *s, int size)
write_ax25(buffer, strlen(buffer), 1);
sleep(1);
huffman = 0;
- memset((char *) &termios, 0, sizeof(termios));
+ memset(&termios, 0, sizeof(termios));
termios.c_iflag = ICRNL | IXOFF;
termios.c_oflag = OPOST | ONLCR;
termios.c_cflag = CS8 | CREAD | CLOCAL;
@@ -846,7 +846,7 @@ int write_ax25(char *s, int len, int kick)
if (!bin && !strncmp(s, "//BIN ON\r", 9)) {
tcgetattr(fdmaster, &save_termios_master);
tcgetattr(0, &save_termios);
- memset((char *) &termios, 0, sizeof(termios));
+ memset(&termios, 0, sizeof(termios));
termios.c_iflag = IGNBRK | IGNPAR;
termios.c_oflag = 0;
termios.c_cflag = CBAUD | CS8 | CREAD | CLOCAL;
@@ -1710,7 +1710,7 @@ again:
struct termios termios;
char *shell = "/bin/sh";
- memset((char *) &termios, 0, sizeof(termios));
+ memset(&termios, 0, sizeof(termios));
ioctl(0, TIOCSCTTY, (char *) 0);