aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2018-09-25 10:59:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-09-27 15:21:30 +0200
commit79e907402e425f359b66b9bc3198514ae11bf240 (patch)
tree9e9ec9b645dca8e38740395dd4b90f79b370cae4
parentca7da823c37e9071348944387c49782c242bf357 (diff)
downloadlibssh-79e907402e425f359b66b9bc3198514ae11bf240.tar.gz
libssh-79e907402e425f359b66b9bc3198514ae11bf240.tar.xz
libssh-79e907402e425f359b66b9bc3198514ae11bf240.zip
tests: Replace ssh_buffer_free() with SSH_BUFFER_FREE()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/unittests/torture_buffer.c4
-rw-r--r--tests/unittests/torture_threads_buffer.c18
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/unittests/torture_buffer.c b/tests/unittests/torture_buffer.c
index 6d504c19..f5cb8f65 100644
--- a/tests/unittests/torture_buffer.c
+++ b/tests/unittests/torture_buffer.c
@@ -22,7 +22,7 @@ static int setup(void **state) {
}
static int teardown(void **state) {
- ssh_buffer_free(*state);
+ SSH_BUFFER_FREE(*state);
return 0;
}
@@ -127,7 +127,7 @@ static void torture_ssh_buffer_get_ssh_string(void **state) {
assert_null(str);
SSH_STRING_FREE(str);
}
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
}
}
}
diff --git a/tests/unittests/torture_threads_buffer.c b/tests/unittests/torture_threads_buffer.c
index 0bdcfd29..2e6f30b6 100644
--- a/tests/unittests/torture_threads_buffer.c
+++ b/tests/unittests/torture_threads_buffer.c
@@ -87,7 +87,7 @@ static void *thread_growing_buffer(void *threadid)
}
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -134,14 +134,14 @@ static void *thread_growing_buffer_shifting(void *threadid)
if (ssh_buffer_get_len(buffer) * 4 < buffer->allocated) {
assert_true(ssh_buffer_get_len(buffer) * 4 >= buffer->allocated);
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
}
}
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -198,7 +198,7 @@ static void *thread_buffer_prepend(void *threadid)
assert_memory_equal(ssh_buffer_get(buffer), "12345bcdef", 10);
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -249,7 +249,7 @@ static void *thread_ssh_buffer_get_ssh_string(void *threadid)
assert_null(str);
SSH_STRING_FREE(str);
}
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
}
}
}
@@ -319,7 +319,7 @@ static void *thread_ssh_buffer_add_format(void *threadid)
SSH_STRING_FREE(s);
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -397,7 +397,7 @@ static void *thread_ssh_buffer_get_format(void *threadid) {
SAFE_FREE(s2);
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -458,7 +458,7 @@ static void *thread_ssh_buffer_get_format_error(void *threadid)
assert_true(s2 == NULL);
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}
@@ -514,7 +514,7 @@ static void *thread_buffer_pack_badformat(void *threadid)
* it could crash the process */
/* Teardown */
- ssh_buffer_free(buffer);
+ SSH_BUFFER_FREE(buffer);
pthread_exit(NULL);
}