aboutsummaryrefslogtreecommitdiff
path: root/src/core/stats_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/core/stats_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/core/stats_test.c')
-rw-r--r--src/core/stats_test.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/stats_test.c b/src/core/stats_test.c
index ba4198ab..e15b4001 100644
--- a/src/core/stats_test.c
+++ b/src/core/stats_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -16,12 +16,12 @@ void
test_stats_socket(void)
{
#ifdef NNG_ENABLE_STATS
- nng_socket s1;
- nng_socket s2;
- nng_stat *st1;
- nng_stat *st2;
- nng_stat *item;
- nng_stat *stats;
+ nng_socket s1;
+ nng_socket s2;
+ const nng_stat *st1;
+ const nng_stat *st2;
+ const nng_stat *item;
+ nng_stat *stats;
NUTS_OPEN(s1);
NUTS_OPEN(s2);
@@ -63,11 +63,11 @@ void
test_stats_dump(void)
{
#ifdef NNG_ENABLE_STATS
- nng_socket s1;
- nng_socket s2;
- nng_stat *st1;
- nng_stat *st2;
- nng_stat *stats;
+ nng_socket s1;
+ nng_socket s2;
+ const nng_stat *st1;
+ const nng_stat *st2;
+ nng_stat *stats;
NUTS_OPEN(s1);
NUTS_OPEN(s2);