diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-07-23 19:15:24 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2025-07-25 16:24:46 +0200 |
commit | 408c977f7be09db3b8aa98224989aec731eb0b5a (patch) | |
tree | ec8781aae11e7b2ec459f541d36252020c2eff3a /src/irmd/reg/tests/reg_test.c | |
parent | 1856a585ae4290e666314ee7907dc8cbbb08fe2d (diff) | |
download | ouroboros-408c977f7be09db3b8aa98224989aec731eb0b5a.tar.gz ouroboros-408c977f7be09db3b8aa98224989aec731eb0b5a.zip |
lib: Swap len and data in the buffer_tbe
This is how the ProtoBufCBinary data type is defined, so it will allow
easier conversion until we get rid of it. But it makes sense, as the
size_t will always be aligned.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg/tests/reg_test.c')
-rw-r--r-- | src/irmd/reg/tests/reg_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/irmd/reg/tests/reg_test.c b/src/irmd/reg/tests/reg_test.c index b69cf476..7f3ba32d 100644 --- a/src/irmd/reg/tests/reg_test.c +++ b/src/irmd/reg/tests/reg_test.c @@ -115,7 +115,7 @@ static int test_reg_allocate_flow_timeout(void) { struct timespec abstime; struct timespec timeo = TIMESPEC_INIT_MS(1); - buffer_t rbuf = {NULL, 0}; + buffer_t rbuf = {0, NULL}; struct flow_info info = { .n_pid = TEST_PID, @@ -173,7 +173,7 @@ static int test_reg_allocate_flow_timeout(void) static void * test_flow_respond_alloc(void * o) { struct flow_info * info = (struct flow_info *) o; - buffer_t pbuf = {NULL, 0}; + buffer_t pbuf = {0, NULL}; if (info->state == FLOW_ALLOCATED) { pbuf.data = (uint8_t *) strdup(TEST_DATA2); @@ -215,7 +215,7 @@ static int test_reg_accept_flow_success(void) pthread_t thr; struct timespec abstime; struct timespec timeo = TIMESPEC_INIT_S(1); - buffer_t rbuf = {NULL, 0}; + buffer_t rbuf = {0, NULL}; struct flow_info info = { .n_pid = TEST_PID, @@ -309,7 +309,7 @@ static int test_reg_accept_flow_success_no_crypt(void) pthread_t thr; struct timespec abstime; struct timespec timeo = TIMESPEC_INIT_S(1); - buffer_t rbuf = {NULL, 0}; + buffer_t rbuf = {0, NULL}; struct flow_info info = { .n_pid = TEST_PID, @@ -398,7 +398,7 @@ static int test_reg_accept_flow_success_no_crypt(void) static int test_reg_allocate_flow_fail(void) { - buffer_t buf = {NULL, 0}; + buffer_t buf = {0, NULL}; pthread_t thr; struct timespec abstime; struct timespec timeo = TIMESPEC_INIT_S(1); @@ -1118,7 +1118,7 @@ static void * test_call_flow_accept(void * o) { struct timespec abstime; struct timespec timeo = TIMESPEC_INIT_MS(1); - buffer_t pbuf = {NULL, 0}; + buffer_t pbuf = {0, NULL}; struct proc_info pinfo = { .pid = TEST_PID, |