X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Foptions.c;h=11dc8dbe15f9d032927fdab8b993bba8c74cfcd1;hp=ca9511f45140b96eadf08694d2597e2f07c524ea;hb=98f7557d475021fb087f75423468226c2ce3df20;hpb=3a36217ed64fc7c30c3c886d85d4f337fe2f9282 diff --git a/src/options.c b/src/options.c index ca9511f..11dc8db 100644 --- a/src/options.c +++ b/src/options.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ /** @@ -66,7 +66,7 @@ int options (const char *desc, char **argv, int argc, char **arg) } if (desc[i] == ':') { /* option with string argument */ - type = desc[i++]; + type = desc[i++]; } if (desc_char == ch) { @@ -90,9 +90,7 @@ int options (const char *desc, char **argv, int argc, char **arg) } else /* option with no argument */ { - if (argv[arg_no][arg_off]) - arg_off++; - else + if (!argv[arg_no][arg_off]) { arg_off = 0; arg_no++;