aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypto/krb/keyblocks.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-11-28 00:43:34 +0000
committerGreg Hudson <ghudson@mit.edu>2009-11-28 00:43:34 +0000
commit65577cf37ab5831e736dd5db8459c0927cd3e224 (patch)
tree49d60364bcfaa50cd849568b7313d92e1388d28c /src/lib/crypto/krb/keyblocks.c
parent9fde1f049d4f2205a9cccdc82278d93e6eaad748 (diff)
downloadkrb5-65577cf37ab5831e736dd5db8459c0927cd3e224.zip
krb5-65577cf37ab5831e736dd5db8459c0927cd3e224.tar.gz
krb5-65577cf37ab5831e736dd5db8459c0927cd3e224.tar.bz2
Mark and reindent lib/crypto
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23374 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/krb/keyblocks.c')
-rw-r--r--src/lib/crypto/krb/keyblocks.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/lib/crypto/krb/keyblocks.c b/src/lib/crypto/krb/keyblocks.c
index d9db694..732a877 100644
--- a/src/lib/crypto/krb/keyblocks.c
+++ b/src/lib/crypto/krb/keyblocks.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* lib/crypto/keyblocks.c
*
@@ -35,7 +36,7 @@
krb5_error_code
krb5int_c_init_keyblock(krb5_context context, krb5_enctype enctype,
- size_t length, krb5_keyblock **out)
+ size_t length, krb5_keyblock **out)
{
krb5_keyblock *kb;
@@ -44,18 +45,18 @@ krb5int_c_init_keyblock(krb5_context context, krb5_enctype enctype,
kb = malloc(sizeof(krb5_keyblock));
if (kb == NULL)
- return ENOMEM;
+ return ENOMEM;
kb->magic = KV5M_KEYBLOCK;
kb->enctype = enctype;
kb->length = length;
if (length) {
- kb->contents = malloc(length);
- if (!kb->contents) {
- free(kb);
- return ENOMEM;
- }
+ kb->contents = malloc(length);
+ if (!kb->contents) {
+ free(kb);
+ return ENOMEM;
+ }
} else {
- kb->contents = NULL;
+ kb->contents = NULL;
}
*out = kb;
@@ -73,14 +74,14 @@ void
krb5int_c_free_keyblock_contents(krb5_context context, krb5_keyblock *key)
{
if (key && key->contents) {
- zapfree(key->contents, key->length);
- key->contents = NULL;
+ zapfree(key->contents, key->length);
+ key->contents = NULL;
}
}
krb5_error_code
krb5int_c_copy_keyblock(krb5_context context, const krb5_keyblock *from,
- krb5_keyblock **to)
+ krb5_keyblock **to)
{
krb5_keyblock *new_key;
krb5_error_code code;
@@ -88,11 +89,11 @@ krb5int_c_copy_keyblock(krb5_context context, const krb5_keyblock *from,
*to = NULL;
new_key = malloc(sizeof(*new_key));
if (!new_key)
- return ENOMEM;
+ return ENOMEM;
code = krb5int_c_copy_keyblock_contents(context, from, new_key);
if (code) {
- free(new_key);
- return code;
+ free(new_key);
+ return code;
}
*to = new_key;
return 0;
@@ -100,7 +101,7 @@ krb5int_c_copy_keyblock(krb5_context context, const krb5_keyblock *from,
krb5_error_code
krb5int_c_copy_keyblock_contents(krb5_context context,
- const krb5_keyblock *from, krb5_keyblock *to)
+ const krb5_keyblock *from, krb5_keyblock *to)
{
*to = *from;
if (to->length) {