chiark / gitweb /
sd-bus: avoid a null dereference
[elogind.git] / src / libsystemd / sd-bus / sd-bus.c
index ff01d608c54305b8dca52288be2e47e32907e86d..ef0b15185f86092a5c7e4def68a7ffe577090774 100644 (file)
@@ -3400,7 +3400,7 @@ _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) {
                 }
 
                 dash = strchr(n, '-');
-                if (streq(dash, "-user")) {
+                if (streq_ptr(dash, "-user")) {
                         *scope = "user";
                         return 0;
                 }