Content of the pointer should be checked, not the pointers themselves.
---
 src/manager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index 03ea523..d15ce20 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -426,8 +426,8 @@ static int parse_peers_service_specs(DBusMessageIter *array,
                dbus_message_iter_next(array);
        }
 
-       if ((*query && !*version) ||
-                               (!*spec && !*query) || (!spec && *version))
+       if ((*query && !*spec && !*version) ||
+                               (!*spec && !*query) || (!*spec && *version))
                return -EINVAL;
 
        return 0;
-- 
1.8.5.5

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to