diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-02 06:12:09 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-02 06:12:09 +0000 |
commit | a8af625de76060fa020793e7e267150c1a43c1e0 (patch) | |
tree | 1bbbd6ad681054fdfd37fe8120e03cfa7d27e01b | |
parent | ce5ad224f061ecc3a10e3698851d57eb6bb3e6e6 (diff) | |
download | krb5-a8af625de76060fa020793e7e267150c1a43c1e0.zip krb5-a8af625de76060fa020793e7e267150c1a43c1e0.tar.gz krb5-a8af625de76060fa020793e7e267150c1a43c1e0.tar.bz2 |
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
-rw-r--r-- | src/lib/krb5/ccache/cc_file.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index 134cbfb..42e9ba0 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 |