From 5e1dd90d814c46ad3ef41053cf7ca3bac6c80466 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 1 Aug 2017 03:09:11 +0200 Subject: 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 --- ax25/axgetput/axgetput.c | 2 +- ax25/axspawn.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'ax25') 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); -- cgit v1.2.3