remove basic usages of memset with {}

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-10-12 23:28:58 -07:00
parent b153fe3f35
commit 48bb69bc7b
2 changed files with 3 additions and 7 deletions
+1 -3
View File
@@ -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,