make struct initialization C99 compatible again

Mainly change {} to { 0 } to remove a pedantic warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-10-14 13:29:13 +02:00
committed by Oliver Hartkopp
parent d3b29dfa48
commit 204235c9ce
4 changed files with 5 additions and 5 deletions
+1 -1
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 = { 0 };
unsigned char brs, esi, ctmp;
unsigned int flags;
int dlc, dlen = 0;
+2 -2
View File
@@ -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 = { 0 };
struct cgw_csum_crc8 cs_crc8 = { 0 };
char crc8tab[513] = {0};
struct modattr modmsg[CGW_MOD_FUNCS];
+1 -1
View File
@@ -365,7 +365,7 @@ static void install_signal(int sig)
static void schedule_itimer(int msec)
{
int ret;
struct itimerval val = {};
struct itimerval val = { 0 };
val.it_value.tv_sec = msec / 1000;
val.it_value.tv_usec = (msec % 1000) * 1000;
+1 -1
View File
@@ -61,7 +61,7 @@ static void onsigalrm(int sig)
static void schedule_oneshot_itimer(double delay)
{
struct itimerval it = {};
struct itimerval it = { 0 };
it.it_value.tv_sec = delay;
it.it_value.tv_usec = (long)(delay * 1e6) % 1000000;