From: Fredrik Thulin Date: Fri, 14 Jan 2011 09:55:09 +0000 (+0100) Subject: Mend infname/outfname argument parsing. X-Git-Tag: v1.4.0~19^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876df7714934f61bbad1b4d64d271a1453bfabdf;p=yubikey-personalization Mend infname/outfname argument parsing. Bug introduced in second-last commit, c9db06dc. --- diff --git a/ykpersonalize.c b/ykpersonalize.c index d4153e0..2cdd447 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -182,7 +182,7 @@ static void report_yk_error() * Done in this way to be testable (see tests/test_args_to_config.c). */ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, - const char *infname, const char *outfname, + const char **infname, const char **outfname, bool *autocommit, char *salt, YK_STATUS *st, bool *verbose, unsigned char *access_code, bool *use_access_code, @@ -204,10 +204,10 @@ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, return 0; break; case 'i': - infname = optarg; + *infname = optarg; break; case 's': - outfname = optarg; + *outfname = optarg; break; case 'a': *aesviahash = true; @@ -442,7 +442,7 @@ int main(int argc, char **argv) /* Parse all arguments in a testable way */ if (! args_to_config(argc, argv, cfg, - infname, outfname, + &infname, &outfname, &autocommit, salt, st, &verbose, access_code, &use_access_code,