From 09aa4d55bff15e44acce17029d82b1586f67e2d1 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 6 Mar 2024 11:42:13 +0100 Subject: [PATCH] asc2log: unify curly brackets at function definition Move the curly brackets to the start of the next line to follow the common coding style in can-utils. Signed-off-by: Oliver Hartkopp --- asc2log.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/asc2log.c b/asc2log.c index d861c67..fbbb01b 100644 --- a/asc2log.c +++ b/asc2log.c @@ -71,8 +71,8 @@ void print_usage(char *prg) fprintf(stderr, "\t-O \t(default stdout)\n"); } -void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, char *extra_info) { - +void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, char *extra_info) +{ static char abuf[BUFLEN]; fprintf(file, "(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec); @@ -86,8 +86,8 @@ void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, ch fprintf(file, "%s%s", abuf, extra_info); } -void get_can_id(struct canfd_frame *cf, char *idstring, int base) { - +void get_can_id(struct canfd_frame *cf, char *idstring, int base) +{ if (idstring[strlen(idstring)-1] == 'x') { cf->can_id = CAN_EFF_FLAG; idstring[strlen(idstring)-1] = 0; @@ -98,8 +98,8 @@ void get_can_id(struct canfd_frame *cf, char *idstring, int base) { } void calc_tv(struct timeval *tv, struct timeval *read_tv, - struct timeval *date_tv, char timestamps, int dplace) { - + struct timeval *date_tv, char timestamps, int dplace) +{ if (dplace == 4) /* shift values having only 4 decimal places */ read_tv->tv_usec *= 100; /* and need for 6 */ @@ -129,8 +129,8 @@ void calc_tv(struct timeval *tv, struct timeval *read_tv, } } -void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, int dplace, FILE *outfile) { - +void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, int dplace, FILE *outfile) +{ int interface; static struct timeval tv; /* current frame timestamp */ static struct timeval read_tv; /* frame timestamp from ASC file */ @@ -239,8 +239,8 @@ void eval_can(char* buf, struct timeval *date_tvp, char timestamps, char base, i } } -void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace, FILE *outfile) { - +void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace, FILE *outfile) +{ int interface; static struct timeval tv; /* current frame timestamp */ static struct timeval read_tv; /* frame timestamp from ASC file */ @@ -376,8 +376,8 @@ void eval_canfd(char* buf, struct timeval *date_tvp, char timestamps, int dplace /* No support for really strange CANFD ErrorFrames format m( */ } -int get_date(struct timeval *tv, char *date) { - +int get_date(struct timeval *tv, char *date) +{ struct tm tms; unsigned int msecs = 0;