summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/krb5/n-fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/krb5/n-fold.c')
-rw-r--r--source4/heimdal/lib/krb5/n-fold.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source4/heimdal/lib/krb5/n-fold.c b/source4/heimdal/lib/krb5/n-fold.c
index 147f6aeac7..fa45b09f18 100644
--- a/source4/heimdal/lib/krb5/n-fold.c
+++ b/source4/heimdal/lib/krb5/n-fold.c
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 1999 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
+ * Copyright (c) 1999 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
@@ -45,7 +45,7 @@ rr13(unsigned char *buf, size_t len)
{
const int bits = 13 % len;
const int lbit = len % 8;
-
+
tmp = malloc(bytes);
if (tmp == NULL)
return ENOMEM;
@@ -67,10 +67,10 @@ rr13(unsigned char *buf, size_t len)
b1 = bb / 8;
s1 = bb % 8;
- if(bb + 8 > bytes * 8)
+ if(bb + 8 > bytes * 8)
/* watch for wraparound */
s2 = (len + 8 - s1) % 8;
- else
+ else
s2 = 8 - s1;
b2 = (b1 + 1) % bytes;
buf[i] = (tmp[b1] << s1) | (tmp[b2] >> s2);
@@ -108,8 +108,8 @@ _krb5_n_fold(const void *str, size_t len, void *key, size_t size)
size_t l = 0;
unsigned char *tmp = malloc(maxlen);
unsigned char *buf = malloc(len);
-
- if (tmp == NULL || buf == NULL)
+
+ if (tmp == NULL || buf == NULL)
return ENOMEM;
memcpy(buf, str, len);