diff options
author | Werner Koch <wk@gnupg.org> | 2019-06-19 14:30:16 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-06-21 11:42:58 +0200 |
commit | 9551275857c1f9a75fee5736fa6c3cf361364f22 (patch) | |
tree | 7f6fae1cb5af658866dd9abfa57962b3f60c914a /scd/app-nks.c | |
parent | po: Update Japanese Translation. (diff) | |
download | gnupg2-9551275857c1f9a75fee5736fa6c3cf361364f22.tar.xz gnupg2-9551275857c1f9a75fee5736fa6c3cf361364f22.zip |
scd: Use enums for cardtype and apptype.
* scd/app-common.h (cardtype_t): New.
(apptype_t): New.
(struct card_ctx_s): Change type of cardtype.
(struct app_ctx_s): Change type of apptype. Adjust all users.
* scd/app.c (struct app_priority_list_s): Add field apptype.
(strcardtype): New. Use as needed.
(strapptype): New. Use as needed.
--
Using strcmp is lame and we can't use a switch to let the compiler
complain about missed cases.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd/app-nks.c')
-rw-r--r-- | scd/app-nks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/app-nks.c b/scd/app-nks.c index bc54c016e..3f985c24a 100644 --- a/scd/app-nks.c +++ b/scd/app-nks.c @@ -1411,7 +1411,7 @@ app_select_nks (app_t app) rc = iso7816_select_application (slot, aid_nks, sizeof aid_nks, 0); if (!rc) { - app->apptype = "NKS"; + app->apptype = APPTYPE_NKS; app->app_local = xtrycalloc (1, sizeof *app->app_local); if (!app->app_local) |