Skip to content

Commit

Permalink
Fix portability, printf bugs in preauth_otp.c
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
greghudson committed Aug 24, 2012
1 parent 979d765 commit af8e75f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/krb5/krb/preauth_otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit af8e75f

Please sign in to comment.