diff --git a/components/Serial_Console/Commands/KEvent_Command.c b/components/Serial_Console/Commands/KEvent_Command.c index 4c540fa..455b41b 100644 --- a/components/Serial_Console/Commands/KEvent_Command.c +++ b/components/Serial_Console/Commands/KEvent_Command.c @@ -29,12 +29,14 @@ #include "esp_log.h" #include "SystemK.h" -uint32_t parse_uint32(const char *str, bool *ok) { +static uint32_t parse_uint32(const char *str, bool *ok) +{ char *end; errno = 0; unsigned long val = strtoul(str, &end, 10); - if (errno != 0 || end == str || *end != '\0' || val > UINT32_MAX) { + if (errno != 0 || end == str || *end != '\0' || val > UINT32_MAX) + { *ok = false; return 0; } @@ -48,7 +50,7 @@ static void print_usage(void) printf( "Usage:\n" " KEvent \n" - " (Note that IDs may be SystemK version-dependant.)\n"); + " (Note that IDs may be SystemK version-dependent.)\n"); } static int cmd_KEvent(int argc, char **argv) @@ -75,13 +77,13 @@ static int cmd_KEvent(int argc, char **argv) else { printf("ERROR: Couldn't parse data!"); - return(-1); + return (-1); } } else { printf("ERROR: Couldn't parse SystemK event!"); - return(-1); + return (-1); } }