From 311958093d9c623abdf7e1395eb8f7044e50c856 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Wed, 4 Mar 2015 08:59:55 +0100 Subject: [PATCH] client_id is supposed to be unsigned --- pam_yubico.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pam_yubico.c b/pam_yubico.c index 80d74a3..24d998d 100644 --- a/pam_yubico.c +++ b/pam_yubico.c @@ -100,7 +100,7 @@ enum key_mode { struct cfg { - int client_id; + unsigned int client_id; const char *client_key; int debug; int alwaysok; @@ -640,7 +640,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg) int i; memset (cfg, 0, sizeof(struct cfg)); - cfg->client_id = -1; + cfg->client_id = 0; cfg->token_id_length = DEFAULT_TOKEN_ID_LEN; cfg->mode = CLIENT; @@ -696,7 +696,7 @@ parse_cfg (int flags, int argc, const char **argv, struct cfg *cfg) D (("flags %d argc %d", flags, argc)); for (i = 0; i < argc; i++) D (("argv[%d]=%s", i, argv[i])); - D (("id=%d", cfg->client_id)); + D (("id=%u", cfg->client_id)); D (("key=%s", cfg->client_key ? cfg->client_key : "(null)")); D (("debug=%d", cfg->debug)); D (("alwaysok=%d", cfg->alwaysok));