From 6ff6e760396f3d9b0ba426888f84d237416feeab Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 26 Aug 2003 20:34:46 +0000 Subject: [PATCH] * cc_file.c (krb5_fcc_store_int32, krb5_fcc_store_ui_4, krb5_fcc_store_ui_2) (krb5_fcc_store_octet): Remove gratuitous conditionalizing of casts on USE_STDIO, left over from merge. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15797 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ChangeLog | 6 +++++ src/lib/krb5/ccache/cc_file.c | 51 ----------------------------------- 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index 3b7edf26d..4d6ea3149 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,3 +1,9 @@ +2003-08-26 Ken Raeburn + + * cc_file.c (krb5_fcc_store_int32, krb5_fcc_store_ui_4) + (krb5_fcc_store_ui_2, krb5_fcc_store_octet): Remove gratuitous + conditionalizing of casts on USE_STDIO, left over from merge. + 2003-07-22 Sam Hartman * ccbase.c: Always register the file credentials cache type. If diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index eb051c150..09ce8d55e 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -971,30 +971,13 @@ krb5_fcc_store_int32(krb5_context context, krb5_ccache id, krb5_int32 i) (data->version == KRB5_FCC_FVNO_2)) return krb5_fcc_write(context, id, (char *) &i, sizeof(krb5_int32)); else { -#ifndef USE_STDIO buf[3] = (unsigned char) (i & 0xFF); -#else - buf[3] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[2] = (unsigned char) (i & 0xFF); -#else - buf[2] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[1] = (unsigned char) (i & 0xFF); -#else - buf[1] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[0] = (unsigned char) (i & 0xFF); -#else - buf[0] = i & 0xFF; -#endif - return krb5_fcc_write(context, id, buf, 4); } } @@ -1009,30 +992,13 @@ krb5_fcc_store_ui_4(krb5_context context, krb5_ccache id, krb5_ui_4 i) (data->version == KRB5_FCC_FVNO_2)) return krb5_fcc_write(context, id, (char *) &i, sizeof(krb5_int32)); else { -#ifndef USE_STDIO buf[3] = (unsigned char) (i & 0xFF); -#else - buf[3] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[2] = (unsigned char) (i & 0xFF); -#else - buf[2] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[1] = (unsigned char) (i & 0xFF); -#else - buf[1] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[0] = (unsigned char) (i & 0xFF); -#else - buf[0] = i & 0xFF; -#endif - return krb5_fcc_write(context, id, buf, 4); } } @@ -1046,25 +1012,12 @@ krb5_fcc_store_ui_2(krb5_context context, krb5_ccache id, krb5_int32 i) if ((data->version == KRB5_FCC_FVNO_1) || (data->version == KRB5_FCC_FVNO_2)) { -#ifndef USE_STDIO ibuf = (krb5_ui_2) i; -#else - ibuf = i; -#endif return krb5_fcc_write(context, id, (char *) &ibuf, sizeof(krb5_ui_2)); } else { -#ifndef USE_STDIO buf[1] = (unsigned char) (i & 0xFF); -#else - buf[1] = i & 0xFF; -#endif i >>= 8; -#ifndef USE_STDIO buf[0] = (unsigned char) (i & 0xFF); -#else - buf[0] = i & 0xFF; -#endif - return krb5_fcc_write(context, id, buf, 2); } } @@ -1074,11 +1027,7 @@ krb5_fcc_store_octet(krb5_context context, krb5_ccache id, krb5_int32 i) { krb5_octet ibuf; -#ifndef USE_STDIO ibuf = (krb5_octet) i; -#else - ibuf = i; -#endif return krb5_fcc_write(context, id, (char *) &ibuf, 1); } -- 2.26.2