Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-20 03:06:14 +0400
committerRussell Belfer <rb@github.com>2013-01-05 03:47:42 +0400
commit8fe713ccf7bf8c6330fdda7f0c733e7f3ab29d3f (patch)
treeafb53ab99c90d710cd31fa9bb21cf03c059778b9 /tests-clar/object
parent5cf9875a4f6ee6fa26f5617aca8433dd49c72751 (diff)
Make git_oid_tostr use out buffer for NULL oid
Previously a NULL oid was handled like an empty buffer and returned a status empty string. This makes git_oid_tostr() set the output buffer to the empty string instead.
Diffstat (limited to 'tests-clar/object')
-rw-r--r--tests-clar/object/raw/convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests-clar/object/raw/convert.c b/tests-clar/object/raw/convert.c
index 7f310ddf0..74442c153 100644
--- a/tests-clar/object/raw/convert.c
+++ b/tests-clar/object/raw/convert.c
@@ -21,9 +21,9 @@ void test_object_raw_convert__succeed_on_oid_to_string_conversion(void)
str = git_oid_tostr(out, 0, &in);
cl_assert(str && *str == '\0' && str != out);
- /* NULL oid pointer, returns static empty string */
+ /* NULL oid pointer, sets existing buffer to empty string */
str = git_oid_tostr(out, sizeof(out), NULL);
- cl_assert(str && *str == '\0' && str != out);
+ cl_assert(str && *str == '\0' && str == out);
/* n == 1, returns out as an empty string */
str = git_oid_tostr(out, 1, &in);