From 795aebbee77bb74d8792df96dfe1aa79ec9548fc Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 10 Jul 2017 15:02:38 -0700 Subject: Give up on uncrustify; switch to clang-format. --- src/platform/posix/posix_debug.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/platform/posix/posix_debug.c') diff --git a/src/platform/posix/posix_debug.c b/src/platform/posix/posix_debug.c index b9321ea5..647d93ff 100644 --- a/src/platform/posix/posix_debug.c +++ b/src/platform/posix/posix_debug.c @@ -12,8 +12,8 @@ #ifdef PLATFORM_POSIX_DEBUG #include -#include #include +#include #include void @@ -22,7 +22,6 @@ nni_plat_abort(void) abort(); } - void nni_plat_println(const char *message) { @@ -30,7 +29,6 @@ nni_plat_println(const char *message) fputc('\n', stderr); } - const char * nni_plat_strerror(int errnum) { @@ -40,7 +38,6 @@ nni_plat_strerror(int errnum) return (strerror(errnum)); } - // There are of course other errors than these, but these are the ones // that we might reasonably expect and want to handle "cleanly". Most of // the others should be handled by the system error code. Note that EFAULT @@ -50,10 +47,10 @@ nni_plat_strerror(int errnum) // error codes should exist, and be distinct positive numbers. (EWOULDBLOCK // and EAGAIN are permitted to have the same value.) static struct { - int posix_err; - int nng_err; -} -nni_plat_errnos[] = { + int posix_err; + int nng_err; +} nni_plat_errnos[] = { + // clang-format off { EINTR, NNG_EINTR }, { EINVAL, NNG_EINVAL }, { ENOMEM, NNG_ENOMEM }, @@ -86,6 +83,7 @@ nni_plat_errnos[] = { { EWOULDBLOCK, NNG_EAGAIN }, // must be last { 0, 0 }, + // clang-format on }; int @@ -108,7 +106,6 @@ nni_plat_errno(int errnum) return (NNG_ESYSERR + errnum); } - #else // Suppress empty symbols warnings in ranlib. -- cgit v1.2.3-70-g09d2