summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-08-24 11:51:31 -0400
committerGreg Hudson <ghudson@mit.edu>2012-08-24 11:51:39 -0400
commitaf8e75fdf9273ddd93add25d59ca05ba9b8c38ce (patch)
tree2c24593442a159af1f757716638cc7b4020ea9f2 /src
parent979d765e0635611fe183a4690b656f3d816939e3 (diff)
downloadkrb5-af8e75fdf9273ddd93add25d59ca05ba9b8c38ce.tar.gz
krb5-af8e75fdf9273ddd93add25d59ca05ba9b8c38ce.tar.xz
krb5-af8e75fdf9273ddd93add25d59ca05ba9b8c38ce.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/preauth_otp.c4
1 files changed, 1 insertions, 3 deletions
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 <stdio.h>
#include <errno.h>
#include <string.h>
-#include <unistd.h>
#include <ctype.h>
#include <string.h>
@@ -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;