eina_streq should immediately return true if both pointers are the same
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 15 Dec 2014 19:21:44 +0000 (14:21 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 15 Dec 2014 19:32:42 +0000 (14:32 -0500)
src/lib/eina/eina_inline_str.x

index 451f35fc11ab67425673a28c048f44de86ca4191..537aafa096b7d0b6fa343ee21d80faa701d7f81e 100644 (file)
@@ -94,6 +94,7 @@ eina_streq(const char *a, const char *b)
    if ((!a) && (!b)) return EINA_TRUE;
    if (!a) return EINA_FALSE;
    if (!b) return EINA_FALSE;
+   if (a == b) return EINA_TRUE;
    return !strcmp(a, b);
 }