If both are NULL, we warn anyway with g_return_val_if_fail, so here we can simply check if either of them is NULL.
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- libwacom/libwacom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c index 339edb4..9671493 100644 --- a/libwacom/libwacom.c +++ b/libwacom/libwacom.c @@ -388,7 +388,7 @@ libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags f { g_return_val_if_fail(a || b, 0); - if ((a && !b) || (b && !a)) + if (!a || !b) return 1; if (strcmp(a->name, b->name) != 0) -- 2.1.0 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel