aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pair1/pair1_poly_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-10-20 17:01:10 -0700
committerGarrett D'Amore <garrett@damore.org>2024-10-20 17:01:10 -0700
commit693773195dcd877164314d6b4c37cbd980cbb6ab (patch)
tree3c6014205fb75d1e39227ac505dab8964e57a815 /src/sp/protocol/pair1/pair1_poly_test.c
parent5830408d11fb19aaf78cb47016ea1692e8f6d2ed (diff)
downloadnng-693773195dcd877164314d6b4c37cbd980cbb6ab.tar.gz
nng-693773195dcd877164314d6b4c37cbd980cbb6ab.tar.bz2
nng-693773195dcd877164314d6b4c37cbd980cbb6ab.zip
Use `const` for nng_stat when possible.
This should help the compiler enforce checks, and may result in better optimizations.
Diffstat (limited to 'src/sp/protocol/pair1/pair1_poly_test.c')
-rw-r--r--src/sp/protocol/pair1/pair1_poly_test.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sp/protocol/pair1/pair1_poly_test.c b/src/sp/protocol/pair1/pair1_poly_test.c
index 3aabb248..895dd935 100644
--- a/src/sp/protocol/pair1/pair1_poly_test.c
+++ b/src/sp/protocol/pair1/pair1_poly_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -22,7 +22,7 @@ test_poly_identity(void)
{
nng_socket s;
int p;
- char * n;
+ char *n;
NUTS_PASS(nng_pair1_open_poly(&s));
NUTS_PASS(nng_socket_get_int(s, NNG_OPT_PROTO, &p));
@@ -43,7 +43,7 @@ test_poly_best_effort(void)
{
nng_socket s1;
nng_socket c1;
- nng_msg * msg;
+ nng_msg *msg;
NUTS_PASS(nng_pair1_open_poly(&s1));
NUTS_PASS(nng_pair1_open(&c1));
@@ -70,7 +70,7 @@ test_poly_cooked(void)
nng_socket s1;
nng_socket c1;
nng_socket c2;
- nng_msg * msg;
+ nng_msg *msg;
bool v;
nng_pipe p1;
nng_pipe p2;
@@ -146,7 +146,7 @@ test_poly_default(void)
nng_socket s1;
nng_socket c1;
nng_socket c2;
- nng_msg * msg;
+ nng_msg *msg;
NUTS_PASS(nng_pair1_open_poly(&s1));
NUTS_PASS(nng_pair1_open(&c1));
@@ -211,7 +211,7 @@ test_poly_recv_no_header(void)
{
nng_socket s;
nng_socket c;
- nng_msg * m;
+ nng_msg *m;
NUTS_PASS(nng_pair1_open_poly(&s));
NUTS_PASS(nng_pair1_open(&c));
@@ -234,7 +234,7 @@ test_poly_recv_garbage(void)
{
nng_socket s;
nng_socket c;
- nng_msg * m;
+ nng_msg *m;
NUTS_PASS(nng_pair1_open_poly(&s));
NUTS_PASS(nng_pair1_open(&c));
@@ -259,7 +259,7 @@ test_poly_ttl(void)
{
nng_socket s1;
nng_socket c1;
- nng_msg * msg;
+ nng_msg *msg;
uint32_t val;
int ttl;
@@ -327,10 +327,10 @@ test_poly_ttl(void)
void
test_poly_validate_peer(void)
{
- nng_socket s1, s2;
- nng_stat * stats;
- nng_stat * reject;
- char * addr;
+ nng_socket s1, s2;
+ nng_stat *stats;
+ const nng_stat *reject;
+ char *addr;
NUTS_ADDR(addr, "inproc");