From: Klas Lindfors Date: Mon, 28 May 2012 10:44:38 +0000 (+0200) Subject: add ndef args to test_args_to_config, make sure ndef_type is initialized. X-Git-Tag: v1.7.0~1^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=850bcdbf46b7e15ed56e082962c9a659256e3e52;p=yubikey-personalization add ndef args to test_args_to_config, make sure ndef_type is initialized. --- diff --git a/tests/test_args_to_config.c b/tests/test_args_to_config.c index 974b4c8..33b8966 100644 --- a/tests/test_args_to_config.c +++ b/tests/test_args_to_config.c @@ -114,7 +114,7 @@ int _test_config (YKP_CONFIG *cfg, YK_STATUS *st, int argc, char **argv) /* Options */ char *salt = NULL; char ndef[128]; - char ndef_type; + char ndef_type = NULL; int rc; @@ -290,6 +290,8 @@ int _test_non_config_args(void) /* Options */ char *salt = NULL; + char ndef[128]; + char ndef_type = NULL; char *argv[] = { "unittest", "-1", "-sout", "-iin", "-c313233343536", "-y", "-v", @@ -310,7 +312,7 @@ int _test_non_config_args(void) &autocommit, salt, st, &verbose, access_code, &use_access_code, - &aesviahash, + &aesviahash, &ndef_type, ndef, &exit_code); assert(rc == 1); i = strcmp(infname, "in"); assert(i == 0); diff --git a/ykpersonalize.c b/ykpersonalize.c index 0ec0784..6c4d24d 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -66,7 +66,7 @@ int main(int argc, char **argv) /* Options */ char *salt = NULL; char ndef_string[128] = {0}; - char ndef_type; + char ndef_type = NULL; bool error = false; int exit_code = 0;