aboutsummaryrefslogtreecommitdiff
path: root/src/core/id_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-10-27 22:34:41 -0700
committerGarrett D'Amore <garrett@damore.org>2021-11-02 22:56:39 -0700
commitc42f32722447cc52810b25decee634210f09d70e (patch)
tree0e3c460138b619f2f9bad2476d5f474c20edbd6e /src/core/id_test.c
parentdb3d5562e723a6d2e4efd190bd3f1360126f5b10 (diff)
downloadnng-c42f32722447cc52810b25decee634210f09d70e.tar.gz
nng-c42f32722447cc52810b25decee634210f09d70e.tar.bz2
nng-c42f32722447cc52810b25decee634210f09d70e.zip
fixes #1346 windows ipc winsec fails frequently in CI/CD
Diffstat (limited to 'src/core/id_test.c')
-rw-r--r--src/core/id_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/id_test.c b/src/core/id_test.c
index 51872e69..b948cc13 100644
--- a/src/core/id_test.c
+++ b/src/core/id_test.c
@@ -1,5 +1,5 @@
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2021 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
@@ -15,8 +15,8 @@ void
test_basic(void)
{
nni_id_map m;
- char * five = "five";
- char * four = "four";
+ char *five = "five";
+ char *four = "four";
nni_id_map_init(&m, 0, 0, false);
@@ -60,8 +60,8 @@ void
test_collision(void)
{
nni_id_map m;
- char * five = "five";
- char * four = "four";
+ char *five = "five";
+ char *four = "four";
nni_id_map_init(&m, 0, 0, false);
@@ -141,7 +141,7 @@ test_dynamic(void)
nni_id_map_init(&m, 10, 13, false);
- // We can fill the table.
+ // We can fill the table.
NUTS_PASS(nni_id_alloc(&m, &id, &expect[0]));
NUTS_TRUE(id == 10);
NUTS_PASS(nni_id_alloc(&m, &id, &expect[1]));
@@ -186,11 +186,11 @@ test_set_out_of_range(void)
void
test_stress(void)
{
- void * values[NUM_VALUES];
+ void *values[NUM_VALUES];
nni_id_map m;
size_t i;
int rv;
- void * x;
+ void *x;
int v;
nni_id_map_init(&m, 0, 0, false);
@@ -240,15 +240,15 @@ out:
// Post stress check.
for (i = 0; i < NUM_VALUES; i++) {
- x = nni_id_get(&m, i);
+ x = nni_id_get(&m, (uint32_t) i);
if (x != values[i]) {
NUTS_TRUE(x == values[i]);
break;
}
// We only use the test macros if we know they are going
- // to fail. Otherwise there will be too many errors reported.
- rv = nni_id_remove(&m, i);
+ // to fail. Otherwise, there will be too many errors reported.
+ rv = nni_id_remove(&m, (uint32_t) i);
if ((x == NULL) && (rv != NNG_ENOENT)) {
NUTS_FAIL(rv, NNG_ENOENT);
} else if ((x != NULL) && (rv != 0)) {