From 0d44e473e31833d4d05d25abf10b90b4a07f2114 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 8 Mar 2021 11:09:16 -0500 Subject: [PATCH 1/2] chore: formatting nits --- runtime/include/current_sandbox.h | 12 ++++++------ runtime/tools/udpclient/udpclient.c | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/runtime/include/current_sandbox.h b/runtime/include/current_sandbox.h index befdb29..c469cff 100644 --- a/runtime/include/current_sandbox.h +++ b/runtime/include/current_sandbox.h @@ -2,9 +2,9 @@ #include "sandbox.h" -void current_sandbox_close_file_descriptor(int io_handle_index); -struct sandbox * current_sandbox_get(void); -int current_sandbox_get_file_descriptor(int io_handle_index); -int current_sandbox_initialize_io_handle(void); -void current_sandbox_set(struct sandbox *sandbox); -int current_sandbox_set_file_descriptor(int io_handle_index, int file_descriptor); +void current_sandbox_close_file_descriptor(int io_handle_index); +struct sandbox *current_sandbox_get(void); +int current_sandbox_get_file_descriptor(int io_handle_index); +int current_sandbox_initialize_io_handle(void); +void current_sandbox_set(struct sandbox *sandbox); +int current_sandbox_set_file_descriptor(int io_handle_index, int file_descriptor); diff --git a/runtime/tools/udpclient/udpclient.c b/runtime/tools/udpclient/udpclient.c index ef4b947..6c7b849 100644 --- a/runtime/tools/udpclient/udpclient.c +++ b/runtime/tools/udpclient/udpclient.c @@ -42,8 +42,8 @@ send_fn(void *d) { struct request *r = (struct request *)d; - char resp[STR_MAX] = { 0 }; - int file_descriptor = -1; + char resp[STR_MAX] = { 0 }; + int file_descriptor = -1; struct sockaddr_in sa; sa.sin_family = AF_INET; @@ -54,7 +54,8 @@ send_fn(void *d) return NULL; } - if (sendto(file_descriptor, r->msg, strlen(r->msg), 0, (struct sockaddr *)&sa, sizeof(sa)) < 0 && errno != EINTR) { + if (sendto(file_descriptor, r->msg, strlen(r->msg), 0, (struct sockaddr *)&sa, sizeof(sa)) < 0 + && errno != EINTR) { perror("sendto"); return NULL; } From 8b04f022d89c6967b3e57af1b1c385a152412991 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 8 Mar 2021 11:09:41 -0500 Subject: [PATCH 2/2] chore: Ignore submodules --- format.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/format.sh b/format.sh index 516950a..d0c5c49 100755 --- a/format.sh +++ b/format.sh @@ -25,6 +25,6 @@ if ((major < required_major)) || ((minor < required_minor)) || ((patch < require exit 1 fi -find ./runtime -type f -path "./*.[ch]" | # Match all *.c and *.h files in ./runtime - grep --invert-match -E "./runtime/jsmn/*|./runtime/http-parser/*" | # Excluding those in the jsmn or http-parser submodules - xargs clang-format -i # And format them with clang-format +find ./runtime -type f -path "./*.[ch]" | # Match all *.c and *.h files in ./runtime + grep --invert-match -E "./runtime/thirdparty/*|./runtime/tests/gocr/*|./runtime/tests/TinyEKF/*|./runtime/tests/CMSIS_5_NN/*|./runtime/tests/sod/*" | # Excluding those in the jsmn or http-parser submodules + xargs clang-format -i # And format them with clang-format