chiark / gitweb /
bus: introduce new SD_BUS_VTABLE_HIDDEN flag for vtable members
[elogind.git] / src / libsystemd-bus / bus-signature.c
index 35c054baf62f7e397a9ff4e9c48176778148c2fd..3fb07943d7c9e09c8a369055c8bb86544cc8c1a3 100644 (file)
@@ -33,7 +33,8 @@ static int signature_element_length_internal(
 
         int r;
 
-        assert(s);
+        assert_return(s, -EINVAL);
+        assert(l);
 
         if (bus_type_is_basic(*s) || *s == SD_BUS_TYPE_VARIANT) {
                 *l = 1;
@@ -114,7 +115,7 @@ bool signature_is_single(const char *s, bool allow_dict_entry) {
         int r;
         size_t t;
 
-        assert(s);
+        assert_return(s, false);
 
         r = signature_element_length_internal(s, allow_dict_entry, 0, 0, &t);
         if (r < 0)
@@ -124,7 +125,8 @@ bool signature_is_single(const char *s, bool allow_dict_entry) {
 }
 
 bool signature_is_pair(const char *s) {
-        assert(s);
+
+        assert_return(s, false);
 
         if (!bus_type_is_basic(*s))
                 return false;
@@ -136,7 +138,7 @@ bool signature_is_valid(const char *s, bool allow_dict_entry) {
         const char *p;
         int r;
 
-        assert(s);
+        assert_return(s, false);
 
         p = s;
         while (*p) {