mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
remove basic usages of memset with {}
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -224,7 +224,7 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace
|
||||
int interface;
|
||||
static struct timeval tv; /* current frame timestamp */
|
||||
static struct timeval read_tv; /* frame timestamp from ASC file */
|
||||
struct canfd_frame cf;
|
||||
struct canfd_frame cf = {};
|
||||
unsigned char brs, esi, ctmp;
|
||||
unsigned int flags;
|
||||
int dlc, dlen = 0;
|
||||
@@ -241,8 +241,6 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 59 c0 \
|
||||
100000 214 223040 80000000 46500250 460a0250 20011736 20010205 */
|
||||
|
||||
memset(&cf, 0, sizeof(cf));
|
||||
|
||||
/* check for valid line without symbolic name */
|
||||
if (sscanf(buf, "%lu.%lu %*s %d %2s %s %hhx %hhx %x %d ",
|
||||
&read_tv.tv_sec, &read_tv.tv_usec, &interface,
|
||||
|
||||
@@ -706,8 +706,8 @@ int main(int argc, char **argv)
|
||||
struct can_filter filter;
|
||||
struct sockaddr_nl nladdr;
|
||||
|
||||
struct cgw_csum_xor cs_xor;
|
||||
struct cgw_csum_crc8 cs_crc8;
|
||||
struct cgw_csum_xor cs_xor = {};
|
||||
struct cgw_csum_crc8 cs_crc8 = {};
|
||||
char crc8tab[513] = {0};
|
||||
|
||||
struct modattr modmsg[CGW_MOD_FUNCS];
|
||||
@@ -717,8 +717,6 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
memset(&cs_xor, 0, sizeof(cs_xor));
|
||||
memset(&cs_crc8, 0, sizeof(cs_crc8));
|
||||
|
||||
while ((opt = getopt(argc, argv, "ADFLs:d:Xteiu:l:f:c:p:x:m:M:?")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
Reference in New Issue
Block a user