]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Make static analyzer happier - cptr can't be NULL here.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 19 Feb 2016 18:20:43 +0000 (20:20 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 20 Feb 2016 10:53:49 +0000 (12:53 +0200)
src/doveadm/doveadm-cmd.c

index cb3bdedb5bc2718c000dc3dadfaa2879de9fc0bf..243bb058d8d80255e6ce80e16df42e0a983bd8fa 100644 (file)
@@ -64,7 +64,7 @@ const struct doveadm_cmd_ver2* doveadm_cmd_find_ver2(const char *cmd_name,
                cptr = cmd->name;
                /* cannot reuse i here because this needs be
                   done more than once */
-               for(int k=0; cptr != NULL && i+k < argc; k++) {
+               for(int k=0; cptr != '\0' && i+k < argc; k++) {
                        size_t alen = strlen(argv[i+k]);
                        /* make sure we don't overstep */
                        if (strlen(cptr) < alen) break;