summaryrefslogtreecommitdiff
path: root/src/core/protocol.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/core/protocol.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/core/protocol.c')
-rw-r--r--src/core/protocol.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/protocol.c b/src/core/protocol.c
index 6aa59e84..a60454de 100644
--- a/src/core/protocol.c
+++ b/src/core/protocol.c
@@ -28,6 +28,7 @@ extern nni_proto nni_surveyor_proto;
extern nni_proto nni_respondent_proto;
static nni_proto *protocols[] = {
+ // clang-format off
&nni_bus_proto,
&nni_pair_proto,
&nni_rep_proto,
@@ -39,12 +40,13 @@ static nni_proto *protocols[] = {
&nni_surveyor_proto,
&nni_respondent_proto,
NULL
+ // clang-format on
};
nni_proto *
nni_proto_find(uint16_t num)
{
- int i;
+ int i;
nni_proto *p;
for (i = 0; (p = protocols[i]) != NULL; i++) {
@@ -55,7 +57,6 @@ nni_proto_find(uint16_t num)
return (p);
}
-
const char *
nni_proto_name(uint16_t num)
{
@@ -67,12 +68,11 @@ nni_proto_name(uint16_t num)
return (p->proto_name);
}
-
uint16_t
nni_proto_number(const char *name)
{
nni_proto *p;
- int i;
+ int i;
for (i = 0; (p = protocols[i]) != NULL; i++) {
if (strcmp(p->proto_name, name) == 0) {
@@ -82,7 +82,6 @@ nni_proto_number(const char *name)
return (NNG_PROTO_NONE);
}
-
uint16_t
nni_proto_peer(uint16_t num)
{