diff options
author | Tom Yu <tlyu@mit.edu> | 2011-10-17 19:11:01 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2011-10-17 19:11:01 +0000 |
commit | 449598819d0e51355473c90682dd397dc305e5d0 (patch) | |
tree | 47340eac824e3883bdca7df4af62979657521eca /src/tests/gssapi | |
parent | f29332a9c8836e515a6f5fcf556bb01f96f6c0a3 (diff) | |
download | krb5-449598819d0e51355473c90682dd397dc305e5d0.tar.gz krb5-449598819d0e51355473c90682dd397dc305e5d0.tar.xz krb5-449598819d0e51355473c90682dd397dc305e5d0.zip |
Make reindent
Also fix pkinit_crypto_nss.c struct initializers and add parens to a
ternary operator in do_as_req.c for better indentation.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25362 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/gssapi')
-rw-r--r-- | src/tests/gssapi/t_accname.c | 8 | ||||
-rw-r--r-- | src/tests/gssapi/t_ccselect.c | 10 | ||||
-rw-r--r-- | src/tests/gssapi/t_gssexts.c | 44 | ||||
-rw-r--r-- | src/tests/gssapi/t_imp_cred.c | 10 | ||||
-rw-r--r-- | src/tests/gssapi/t_saslname.c | 42 | ||||
-rw-r--r-- | src/tests/gssapi/t_spnego.c | 48 |
6 files changed, 81 insertions, 81 deletions
diff --git a/src/tests/gssapi/t_accname.c b/src/tests/gssapi/t_accname.c index 9912ecfe1..0326cedc7 100644 --- a/src/tests/gssapi/t_accname.c +++ b/src/tests/gssapi/t_accname.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2011 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -59,14 +59,14 @@ display_status_1(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void display_status(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status_1(msg, maj_stat, GSS_C_GSS_CODE); - display_status_1(msg, min_stat, GSS_C_MECH_CODE); + display_status_1(msg, maj_stat, GSS_C_GSS_CODE); + display_status_1(msg, min_stat, GSS_C_MECH_CODE); } int diff --git a/src/tests/gssapi/t_ccselect.c b/src/tests/gssapi/t_ccselect.c index 3a5bae5d8..620ce1c4b 100644 --- a/src/tests/gssapi/t_ccselect.c +++ b/src/tests/gssapi/t_ccselect.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* tests/gssapi/t_ccselect.c - Test program for GSSAPI cred selection */ /* * Copyright 2011 by the Massachusetts Institute of Technology. @@ -60,15 +60,15 @@ display_status_1(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void gsserr(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status_1(msg, maj_stat, GSS_C_GSS_CODE); - display_status_1(msg, min_stat, GSS_C_MECH_CODE); - exit(1); + display_status_1(msg, maj_stat, GSS_C_GSS_CODE); + display_status_1(msg, min_stat, GSS_C_MECH_CODE); + exit(1); } int diff --git a/src/tests/gssapi/t_gssexts.c b/src/tests/gssapi/t_gssexts.c index d4cb292cb..059f63340 100644 --- a/src/tests/gssapi/t_gssexts.c +++ b/src/tests/gssapi/t_gssexts.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2009 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -63,28 +63,28 @@ static int use_spnego = 0; static void displayStatus_1(char *m, OM_uint32 code, int type) { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static OM_uint32 @@ -159,7 +159,7 @@ testPrf(OM_uint32 *minor, gss_ctx_id_t initiatorContext, } printf("%s\n", flags == GSS_C_PRF_KEY_FULL ? - "PRF_KEY_FULL" : "PRF_KEY_PARTIAL"); + "PRF_KEY_FULL" : "PRF_KEY_PARTIAL"); printf("Initiator PRF: "); for (i = 0; i < initiatorPrf.length; i++) { @@ -334,7 +334,7 @@ getDefaultCred(OM_uint32 *minor, const char *keytab_name, gss_OID_set mechs, krb5_cc_close(context, ccache); krb5_kt_close(context, keytab); krb5_free_context(context); - } else { + } else { gss_OID_set actual_mechs = GSS_C_NO_OID_SET; major = gss_acquire_cred(minor, @@ -369,7 +369,7 @@ main(int argc, char *argv[]) if (argc < 2 || argc > 5) { fprintf(stderr, "Usage: %s [--spnego] [user] " - "[proxy-target] [keytab]\n", argv[0]); + "[proxy-target] [keytab]\n", argv[0]); fprintf(stderr, " proxy-target and keytab are optional\n"); exit(1); } @@ -409,7 +409,7 @@ main(int argc, char *argv[]) } mechs.elements = use_spnego ? (gss_OID)&spnego_mech : - (gss_OID)gss_mech_krb5; + (gss_OID)gss_mech_krb5; mechs.count = 1; major = getDefaultCred(&minor, diff --git a/src/tests/gssapi/t_imp_cred.c b/src/tests/gssapi/t_imp_cred.c index f15a274f9..2818b22fd 100644 --- a/src/tests/gssapi/t_imp_cred.c +++ b/src/tests/gssapi/t_imp_cred.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* tests/gssapi/t_imp_cred.c - krb5_gss_import_cred test harness */ /* * Copyright 2011 by the Massachusetts Institute of Technology. @@ -58,15 +58,15 @@ display_status(const char *m, OM_uint32 code, int type) if (!msg_ctx) break; - } + } } static void exit_gsserr(const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - display_status(msg, maj_stat, GSS_C_GSS_CODE); - display_status(msg, min_stat, GSS_C_MECH_CODE); - exit(1); + display_status(msg, maj_stat, GSS_C_GSS_CODE); + display_status(msg, min_stat, GSS_C_MECH_CODE); + exit(1); } static void diff --git a/src/tests/gssapi/t_saslname.c b/src/tests/gssapi/t_saslname.c index 4794c8f96..8d1b28c20 100644 --- a/src/tests/gssapi/t_saslname.c +++ b/src/tests/gssapi/t_saslname.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2009 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -33,28 +33,28 @@ static void displayStatus_1(char *m, OM_uint32 code, int type) { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(char *msg, OM_uint32 maj_stat, OM_uint32 min_stat) { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static @@ -166,9 +166,9 @@ int main(int argc, char *argv[]) &oid))) { displayStatus("gss_inquire_mech_for_saslname", major, minor); } else if (oid == GSS_C_NO_OID || - (oid->length != mechs->elements[i].length && - memcmp(oid->elements, mechs->elements[i].elements, - oid->length) != 0)) { + (oid->length != mechs->elements[i].length && + memcmp(oid->elements, mechs->elements[i].elements, + oid->length) != 0)) { gss_release_buffer(&minor, &oidstr); (void) gss_oid_to_str(&minor, oid, &oidstr); fprintf(stderr, "Got different OID %.*s for mechanism %.*s\n", diff --git a/src/tests/gssapi/t_spnego.c b/src/tests/gssapi/t_spnego.c index 54ab14739..adb5737ab 100644 --- a/src/tests/gssapi/t_spnego.c +++ b/src/tests/gssapi/t_spnego.c @@ -1,4 +1,4 @@ -/* -*- mode: c; indent-tabs-mode: nil -*- */ +/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2010 by the Massachusetts Institute of Technology. * All Rights Reserved. @@ -42,34 +42,34 @@ static gss_OID_desc spnego_mech = { 6, "\053\006\001\005\005\002" }; static void displayStatus_1(m, code, type) - char *m; - OM_uint32 code; - int type; + char *m; + OM_uint32 code; + int type; { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc msg; - OM_uint32 msg_ctx; - - msg_ctx = 0; - while (1) { - maj_stat = gss_display_status(&min_stat, code, - type, GSS_C_NULL_OID, - &msg_ctx, &msg); - fprintf(stderr, "%s: %s\n", m, (char *)msg.value); - (void) gss_release_buffer(&min_stat, &msg); - - if (!msg_ctx) - break; - } + OM_uint32 maj_stat, min_stat; + gss_buffer_desc msg; + OM_uint32 msg_ctx; + + msg_ctx = 0; + while (1) { + maj_stat = gss_display_status(&min_stat, code, + type, GSS_C_NULL_OID, + &msg_ctx, &msg); + fprintf(stderr, "%s: %s\n", m, (char *)msg.value); + (void) gss_release_buffer(&min_stat, &msg); + + if (!msg_ctx) + break; + } } static void displayStatus(msg, maj_stat, min_stat) - char *msg; - OM_uint32 maj_stat; - OM_uint32 min_stat; + char *msg; + OM_uint32 maj_stat; + OM_uint32 min_stat; { - displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); - displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); + displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE); + displayStatus_1(msg, min_stat, GSS_C_MECH_CODE); } static OM_uint32 |