chiark / gitweb /
systemd-python: _reader now takes unix timestamp in seconds
[elogind.git] / src / shared / socket-util.c
index 56ec99f442388e2779ba7401a5005368e6c61cd6..6c94d69486806cdf5dea43c0c01f713cc38ab8de 100644 (file)
@@ -38,6 +38,7 @@
 #include "path-util.h"
 #include "socket-util.h"
 #include "missing.h"
+#include "fileio.h"
 
 int socket_address_parse(SocketAddress *a, const char *s) {
         int r;
@@ -432,7 +433,7 @@ bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) {
                         return false;
 
                 if (a->sockaddr.un.sun_path[0]) {
-                        if (strncmp(a->sockaddr.un.sun_path, b->sockaddr.un.sun_path, sizeof(a->sockaddr.un.sun_path)) != 0)
+                        if (!strneq(a->sockaddr.un.sun_path, b->sockaddr.un.sun_path, sizeof(a->sockaddr.un.sun_path)))
                                 return false;
                 } else {
                         if (memcmp(a->sockaddr.un.sun_path, b->sockaddr.un.sun_path, a->size) != 0)