From 693773195dcd877164314d6b4c37cbd980cbb6ab Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 20 Oct 2024 17:01:10 -0700 Subject: Use `const` for nng_stat when possible. This should help the compiler enforce checks, and may result in better optimizations. --- src/sp/protocol/pipeline0/pull_test.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/sp/protocol/pipeline0/pull_test.c') 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. +// Copyright 2024 Staysail Systems, Inc. // // 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)); -- cgit v1.2.3-70-g09d2