]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix portability, printf bugs in preauth_otp.c
authorGreg Hudson <ghudson@mit.edu>
Fri, 24 Aug 2012 15:51:31 +0000 (11:51 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 24 Aug 2012 15:51:39 +0000 (11:51 -0400)
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

index 04eeb72ea11d0d27dfcbfe3616d696245447610e..b0044ae33c7b85e02ff3088fe9b0a88944e2b23d 100644 (file)
@@ -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;