From: Greg Hudson Date: Fri, 24 Aug 2012 15:51:31 +0000 (-0400) Subject: Fix portability, printf bugs in preauth_otp.c X-Git-Tag: krb5-1.11-alpha1~301 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af8e75fdf9273ddd93add25d59ca05ba9b8c38ce;p=thirdparty%2Fkrb5.git Fix portability, printf bugs in preauth_otp.c unistd.h is not available on Windows and isn't needed for this file, so don't include it. Two arguments to asprintf in choose_token() were reversed. --- diff --git a/src/lib/krb5/krb/preauth_otp.c b/src/lib/krb5/krb/preauth_otp.c index 04eeb72ea1..b0044ae33c 100644 --- a/src/lib/krb5/krb/preauth_otp.c +++ b/src/lib/krb5/krb/preauth_otp.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -168,8 +167,7 @@ choose_token(krb5_context context, krb5_prompter_fct prompter, if (asprintf(&tmp, "%s\t%d. %s %.*s\n", banner ? banner : _("Please choose from the following:\n"), - i + 1, tis[i]->vendor.length, - _("Vendor:"), + i + 1, _("Vendor:"), tis[i]->vendor.length, tis[i]->vendor.data) < 0) { free(banner); return ENOMEM;