aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pipeline0/pull_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/pipeline0/pull_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/pipeline0/pull_test.c')
-rw-r--r--src/sp/protocol/pipeline0/pull_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sp/protocol/pipeline0/pull_test.c b/src/sp/protocol/pipeline0/pull_test.c
index 25066093..be11a42d 100644
--- a/src/sp/protocol/pipeline0/pull_test.c
+++ b/src/sp/protocol/pipeline0/pull_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -14,7 +14,7 @@ test_pull_identity(void)
{
nng_socket s;
int p;
- char * n;
+ char *n;
NUTS_PASS(nng_pull0_open(&s));
NUTS_PASS(nng_socket_get_int(s, NNG_OPT_PROTO, &p));
@@ -104,7 +104,7 @@ test_pull_close_pending(void)
nng_socket pull;
nng_socket push;
nng_pipe p1, p2;
- char * addr;
+ char *addr;
NUTS_ADDR(addr, "inproc");
@@ -136,10 +136,10 @@ test_pull_close_pending(void)
void
test_pull_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");
@@ -168,7 +168,7 @@ static void
test_pull_recv_aio_stopped(void)
{
nng_socket s;
- nng_aio * aio;
+ nng_aio *aio;
NUTS_PASS(nng_pull0_open(&s));
NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL));
@@ -185,7 +185,7 @@ static void
test_pull_close_recv(void)
{
nng_socket s;
- nng_aio * aio;
+ nng_aio *aio;
NUTS_PASS(nng_pull0_open(&s));
NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL));
@@ -202,7 +202,7 @@ static void
test_pull_recv_nonblock(void)
{
nng_socket s;
- nng_aio * aio;
+ nng_aio *aio;
NUTS_PASS(nng_pull0_open(&s));
NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL));
@@ -220,7 +220,7 @@ static void
test_pull_recv_cancel(void)
{
nng_socket s;
- nng_aio * aio;
+ nng_aio *aio;
NUTS_PASS(nng_pull0_open(&s));
NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL));