aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_debug.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-10 15:02:38 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-10 15:02:38 -0700
commit795aebbee77bb74d8792df96dfe1aa79ec9548fc (patch)
tree58c16424c16b9e71cebdceaee4507ab6608f80da /src/platform/posix/posix_debug.c
parentde90f97167d2df6739db47b2c6aad85f06250270 (diff)
downloadnng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.gz
nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.tar.bz2
nng-795aebbee77bb74d8792df96dfe1aa79ec9548fc.zip
Give up on uncrustify; switch to clang-format.
Diffstat (limited to 'src/platform/posix/posix_debug.c')
-rw-r--r--src/platform/posix/posix_debug.c15
1 files changed, 6 insertions, 9 deletions
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 <errno.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
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.