diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-09 16:13:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:46:51 -0400 |
commit | 5ce005002cd30a71f4355bd4fa8884154d6bd1ad (patch) | |
tree | fc1facc7b3d2ec26cc3e4def70b39ff425e94f4f | |
parent | c8382c8e3295a1c85975c1898410f4d103650e4a (diff) |
V4L/DVB: drivers/media: drop redundant memset
The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e1,e2,e3,e4;
@@
- memset(e1,e2,e3);
memcpy(e1,e4,e3);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 8b0cde38984d..248a2a9d8416 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -930,7 +930,6 @@ static int dst_fw_ver(struct dst_state *state) | |||
930 | dprintk(verbose, DST_INFO, 1, "Unsupported Command"); | 930 | dprintk(verbose, DST_INFO, 1, "Unsupported Command"); |
931 | return -1; | 931 | return -1; |
932 | } | 932 | } |
933 | memset(&state->fw_version, '\0', 8); | ||
934 | memcpy(&state->fw_version, &state->rxbuffer, 8); | 933 | memcpy(&state->fw_version, &state->rxbuffer, 8); |
935 | dprintk(verbose, DST_ERROR, 1, "Firmware Ver = %x.%x Build = %02x, on %x:%x, %x-%x-20%02x", | 934 | dprintk(verbose, DST_ERROR, 1, "Firmware Ver = %x.%x Build = %02x, on %x:%x, %x-%x-20%02x", |
936 | state->fw_version[0] >> 4, state->fw_version[0] & 0x0f, | 935 | state->fw_version[0] >> 4, state->fw_version[0] & 0x0f, |
@@ -1053,7 +1052,6 @@ static int dst_get_tuner_info(struct dst_state *state) | |||
1053 | goto force; | 1052 | goto force; |
1054 | } | 1053 | } |
1055 | } | 1054 | } |
1056 | memset(&state->board_info, '\0', 8); | ||
1057 | memcpy(&state->board_info, &state->rxbuffer, 8); | 1055 | memcpy(&state->board_info, &state->rxbuffer, 8); |
1058 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { | 1056 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { |
1059 | dprintk(verbose, DST_ERROR, 1, "DST type has TS=188"); | 1057 | dprintk(verbose, DST_ERROR, 1, "DST type has TS=188"); |