]> www.infradead.org Git - mtd-utils.git/commitdiff
ubi-utils: ubimkvol: fix parameters parsing regression
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 31 May 2011 05:07:41 +0000 (08:07 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 31 May 2011 04:39:48 +0000 (07:39 +0300)
Commit 924862c864da0b62cf93ba7abf2dc78a7e6ac48f broke ubimkvol parrameters
parsing by initializing the 'error' parameter of 'simple_strtoul()' to 1
instead of 0. This patch fixes the issue.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ubi-utils/src/ubimkvol.c

index db71e2f8b8aa0f23702d9ec8187ef1b5a0b54df9..935f0682e66f70ae87c0884c8be12fa175a5b4e1 100644 (file)
@@ -121,7 +121,7 @@ static int param_sanity_check(void)
 static int parse_opt(int argc, char * const argv[])
 {
        while (1) {
-               int key, error = 1;
+               int key, error = 0;
 
                key = getopt_long(argc, argv, "a:n:N:s:S:t:h?Vm", long_options, NULL);
                if (key == -1)