chiark / gitweb /
tree-wide: use sd_id128_is_null() instead of sd_id128_equal where appropriate
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Jul 2016 14:06:31 +0000 (16:06 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000 (10:13 +0200)
It's a bit easier to read because shorter. Also, most likely a tiny bit faster.

src/libelogind/sd-bus/bus-socket.c

index f1e2a06..cfd7753 100644 (file)
@@ -221,7 +221,7 @@ static int bus_socket_auth_verify_client(sd_bus *b) {
                 peer.bytes[i/2] = ((uint8_t) x << 4 | (uint8_t) y);
         }
 
-        if (!sd_id128_equal(b->server_id, SD_ID128_NULL) &&
+        if (!sd_id128_is_null(b->server_id) &&
             !sd_id128_equal(b->server_id, peer))
                 return -EPERM;