krb5 commit: Fix portability, printf bugs in preauth_otp.c
Greg Hudson
ghudson at MIT.EDU
Fri Aug 24 11:54:01 EDT 2012
https://github.com/krb5/krb5/commit/af8e75fdf9273ddd93add25d59ca05ba9b8c38ce
commit af8e75fdf9273ddd93add25d59ca05ba9b8c38ce
Author: Greg Hudson <ghudson at mit.edu>
Date: Fri Aug 24 11:51:31 2012 -0400
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.
src/lib/krb5/krb/preauth_otp.c | 4 +---
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 04eeb72..b0044ae 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;
More information about the cvs-krb5
mailing list