]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm dump: Allow doveadm_cmd_dump.test() to be NULL
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 22 Dec 2017 13:11:45 +0000 (15:11 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 22 Dec 2017 13:34:21 +0000 (15:34 +0200)
This means that there's no auto-detection for the dump type.

src/doveadm/doveadm-dump.c

index ff5774bf47713587a7db9f2ec348cb8ec052ca17..b5dbdebac3bbfd04d46f1d34a80484e72737e859 100644 (file)
@@ -33,7 +33,7 @@ dump_find_test(const char *path)
        const struct doveadm_cmd_dump *const *dumpp;
 
        array_foreach(&dumps, dumpp) {
-               if ((*dumpp)->test(path))
+               if ((*dumpp)->test != NULL && (*dumpp)->test(path))
                        return *dumpp;
        }
        return NULL;