changeset 21342:77b037d4b9b8

master: Update assert to make sure optind != 0 Hopefully prevents Coverity warning about "doubleops[optind]" access being uninitialized.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 18 Dec 2016 13:20:39 +0200
parents 499e52172881
children 003d74d026f3
files src/master/main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/main.c	Sun Dec 18 12:54:34 2016 +0200
+++ b/src/master/main.c	Sun Dec 18 13:20:39 2016 +0200
@@ -770,7 +770,7 @@
 			break;
 		}
 	}
-	i_assert(optind <= argc);
+	i_assert(optind > 0 && optind <= argc);
 
 	if (doveconf_arg != NULL) {
 		const char **args;