]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: empty types string is ok
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 15 Oct 2012 09:02:15 +0000 (11:02 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 15 Oct 2012 09:02:15 +0000 (11:02 +0200)
Since now return code is test - return OK for this case.

libdaemon/server/daemon-log.c

index 1e1c9e057a35a23a4a760ff9450f60c6307fa3a9..6f5f4dc4548c4ca795ebb5e3e3fd56deac1ce05a 100644 (file)
@@ -153,12 +153,16 @@ static int _parse_one(log_state *s, int outlet, const char *type, int enable)
 
 int daemon_log_parse(log_state *s, int outlet, const char *types, int enable)
 {
-       char *buf = dm_strdup(types);
-       char *pos = buf;
+       char *buf;
+       char *pos;
 
-       if (!buf)
+       if (!types || !types[0])
+               return 1;
+
+       if (!(buf = dm_strdup(types)))
                return 0;
 
+       pos = buf;
        while (pos) {
                char *next = strchr(pos, ',');
                if (next)
This page took 0.035983 seconds and 5 git commands to generate.