zink: change a memcmp==0 to !memcmp
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 7 Dec 2020 20:43:33 +0000 (15:43 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 8 Dec 2020 17:35:48 +0000 (17:35 +0000)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>

src/gallium/drivers/zink/zink_program.c

index 58b4479..f62f331 100644 (file)
@@ -324,7 +324,7 @@ hash_gfx_pipeline_state(const void *key)
 static bool
 equals_gfx_pipeline_state(const void *a, const void *b)
 {
-   return memcmp(a, b, offsetof(struct zink_gfx_pipeline_state, hash)) == 0;
+   return !memcmp(a, b, offsetof(struct zink_gfx_pipeline_state, hash));
 }
 
 static void