diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-14 17:45:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-14 17:45:26 +0200 |
commit | 42c5aaf3ba3eb9e11a1a2cad105e0dd956ac9763 (patch) | |
tree | 231405000cd34664efddba48e7719f750d088c4f /src/libsystemd-bus/bus-internal.c | |
parent | ed5c5dbde1575d74c87ae9856fe61268d7ae8f4b (diff) |
bus: fix counting of argN= matches
Diffstat (limited to 'src/libsystemd-bus/bus-internal.c')
-rw-r--r-- | src/libsystemd-bus/bus-internal.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c index df295539ac..3271354600 100644 --- a/src/libsystemd-bus/bus-internal.c +++ b/src/libsystemd-bus/bus-internal.c @@ -171,6 +171,12 @@ bool member_name_is_valid(const char *p) { static bool complex_pattern_check(char c, const char *a, const char *b) { bool separator = false; + if (!a && !b) + return true; + + if (!a || !b) + return false; + for (;;) { if (*a != *b) return (separator && (*a == 0 || *b == 0)) || @@ -195,6 +201,13 @@ bool path_complex_pattern(const char *pattern, const char *value) { } static bool simple_pattern_check(char c, const char *a, const char *b) { + + if (!a && !b) + return true; + + if (!a || !b) + return false; + for (;;) { if (*a != *b) return *a == 0 && *b == c; |