]> err.no Git - yubikey-personalization/commitdiff
add ndef args to test_args_to_config, make sure ndef_type is initialized.
authorKlas Lindfors <klas@yubico.com>
Mon, 28 May 2012 10:44:38 +0000 (12:44 +0200)
committerKlas Lindfors <klas@yubico.com>
Mon, 28 May 2012 10:44:38 +0000 (12:44 +0200)
tests/test_args_to_config.c
ykpersonalize.c

index 974b4c825ea479136279b530834481b6e7e5357b..33b8966c30fc8b6185da92d86d7cf165fa6d5c0e 100644 (file)
@@ -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);
index 0ec078407a7d9b636db409dba15b8ad38139b7fb..6c4d24df16c4ec645a2f8ee246947cbd9f83e141 100644 (file)
@@ -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;