summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-01-20 21:23:19 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-01-24 15:10:03 +0100
commit8c4aeae19dbb436c17b5f4032285adbaed727eea (patch)
tree8c8e829ffb8b8f693914d175711e2841e5cb6946 /src
parent6095e82a99cc1c1fcac5e00f0a770302cc46eb2b (diff)
downloadsssd-8c4aeae19dbb436c17b5f4032285adbaed727eea.tar.gz
sssd-8c4aeae19dbb436c17b5f4032285adbaed727eea.tar.xz
sssd-8c4aeae19dbb436c17b5f4032285adbaed727eea.zip
TESTS: Fix authtok test for zero length string.
There is a test for sss_authtok_set where '\0' is used as argument data. '\0' is evaluated as zero and zero is treated as a null pointer. And there is another test for NULL pointer few lines before. Patch changes 3rd argument '\0' into properly cast zero length sting ""
Diffstat (limited to 'src')
-rw-r--r--src/tests/cmocka/test_authtok.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/cmocka/test_authtok.c b/src/tests/cmocka/test_authtok.c
index c4e394cf8..50205cc33 100644
--- a/src/tests/cmocka/test_authtok.c
+++ b/src/tests/cmocka/test_authtok.c
@@ -204,7 +204,7 @@ static void test_sss_authtok_empty(void **state)
assert_int_equal(0, sss_authtok_get_size(ts->authtoken));
assert_null(sss_authtok_get_data(ts->authtoken));
- ret = sss_authtok_set(ts->authtoken, type, '\0', 0);
+ ret = sss_authtok_set(ts->authtoken, type, (const uint8_t*)"", 0);
assert_int_equal(ret, EOK);
assert_int_equal(type, sss_authtok_get_type(ts->authtoken));