1
0
forked from drath/libratbag

Always return NULL from the _unref() calls

There's no good reason to return the object from the unref() call other than
for testing purposes, and we can work around this by using valgrind instead.
The API is a lot more consistent when we always return NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-10-13 07:40:46 +10:00
parent 3d380af3a8
commit a36f83606c
4 changed files with 47 additions and 62 deletions

View File

@@ -107,9 +107,9 @@ START_TEST(context_ref)
ck_assert_ptr_eq(lr, lr2);
lr2 = ratbag_unref(lr2);
ck_assert_ptr_eq(lr2, lr);
ck_assert_ptr_eq(lr2, NULL);
lr2 = ratbag_unref(lr2);
lr2 = ratbag_unref(lr);
ck_assert_ptr_eq(lr2, NULL);
}
END_TEST