From a8af625de76060fa020793e7e267150c1a43c1e0 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 2 Aug 2008 06:12:09 +0000 Subject: [PATCH] Reduce code duplication: krb5_fcc_store_int32 vs krb5_fcc_store_ui_4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20595 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/cc_file.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index 134cbfbb3..42e9ba0f6 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -1033,24 +1033,7 @@ krb5_fcc_store_data(krb5_context context, krb5_ccache id, krb5_data *data) static krb5_error_code krb5_fcc_store_int32(krb5_context context, krb5_ccache id, krb5_int32 i) { - krb5_fcc_data *data = (krb5_fcc_data *)id->data; - unsigned char buf[4]; - - k5_assert_locked(&((krb5_fcc_data *) id->data)->lock); - - if ((data->version == KRB5_FCC_FVNO_1) || - (data->version == KRB5_FCC_FVNO_2)) - return krb5_fcc_write(context, id, (char *) &i, sizeof(krb5_int32)); - else { - buf[3] = (unsigned char) (i & 0xFF); - i >>= 8; - buf[2] = (unsigned char) (i & 0xFF); - i >>= 8; - buf[1] = (unsigned char) (i & 0xFF); - i >>= 8; - buf[0] = (unsigned char) (i & 0xFF); - return krb5_fcc_write(context, id, buf, 4); - } + return krb5_fcc_store_ui_4(context, id, (krb5_ui_4) i); } static krb5_error_code -- 2.26.2