mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
c8382c8e32
commit
5ce005002c
|
@ -930,7 +930,6 @@ static int dst_fw_ver(struct dst_state *state)
|
||||||
dprintk(verbose, DST_INFO, 1, "Unsupported Command");
|
dprintk(verbose, DST_INFO, 1, "Unsupported Command");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memset(&state->fw_version, '\0', 8);
|
|
||||||
memcpy(&state->fw_version, &state->rxbuffer, 8);
|
memcpy(&state->fw_version, &state->rxbuffer, 8);
|
||||||
dprintk(verbose, DST_ERROR, 1, "Firmware Ver = %x.%x Build = %02x, on %x:%x, %x-%x-20%02x",
|
dprintk(verbose, DST_ERROR, 1, "Firmware Ver = %x.%x Build = %02x, on %x:%x, %x-%x-20%02x",
|
||||||
state->fw_version[0] >> 4, state->fw_version[0] & 0x0f,
|
state->fw_version[0] >> 4, state->fw_version[0] & 0x0f,
|
||||||
|
@ -1053,7 +1052,6 @@ static int dst_get_tuner_info(struct dst_state *state)
|
||||||
goto force;
|
goto force;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memset(&state->board_info, '\0', 8);
|
|
||||||
memcpy(&state->board_info, &state->rxbuffer, 8);
|
memcpy(&state->board_info, &state->rxbuffer, 8);
|
||||||
if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
|
if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
|
||||||
dprintk(verbose, DST_ERROR, 1, "DST type has TS=188");
|
dprintk(verbose, DST_ERROR, 1, "DST type has TS=188");
|
||||||
|
|
Loading…
Reference in New Issue