aboutsummaryrefslogtreecommitdiff
path: root/lib/sha1.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-03-23 11:43:54 -0700
committerBen Pfaff <blp@nicira.com>2012-03-23 12:20:07 -0700
commit05fe17646fc1ed2527f26eddb13e09ec14cc29b9 (patch)
treed1e8e3580516cf97faa904c4060859508842ca4e /lib/sha1.c
parentada3428f0906c835d2f7e84745b0a477bade5a11 (diff)
treewide: Convert tabs to spaces in C source files written in OVS style.
The Open vSwitch C style doesn't use hard tabs. This commit doesn't touch files written in kernel style or that are imported from other projects where we want to minimize changes from upstream (the sflow files). Reported-by: Mehak Mahajan <mmahajan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/sha1.c')
-rw-r--r--lib/sha1.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index cdccab3b..6205e500 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -23,10 +23,10 @@
/* This software also makes use of the following component:
*
* NIST Secure Hash Algorithm
- * heavily modified by Uwe Hollerbach uh@alumni.caltech edu
- * from Peter C. Gutmann's implementation as found in
- * Applied Cryptography by Bruce Schneier
- * This code is hereby placed in the public domain
+ * heavily modified by Uwe Hollerbach uh@alumni.caltech edu
+ * from Peter C. Gutmann's implementation as found in
+ * Applied Cryptography by Bruce Schneier
+ * This code is hereby placed in the public domain
*/
#include <config.h>
@@ -65,10 +65,10 @@ f4(uint32_t x, uint32_t y, uint32_t z)
}
/* SHA constants */
-#define CONST1 0x5a827999L
-#define CONST2 0x6ed9eba1L
-#define CONST3 0x8f1bbcdcL
-#define CONST4 0xca62c1d6L
+#define CONST1 0x5a827999L
+#define CONST2 0x6ed9eba1L
+#define CONST3 0x8f1bbcdcL
+#define CONST4 0xca62c1d6L
/* 32-bit rotate */
static inline uint32_t
@@ -157,19 +157,19 @@ maybe_byte_reverse(uint32_t *buffer OVS_UNUSED, int count OVS_UNUSED)
int i;
uint8_t ct[4], *cp;
- count /= sizeof(uint32_t);
- cp = (uint8_t *) buffer;
- for (i = 0; i < count; i++) {
- ct[0] = cp[0];
- ct[1] = cp[1];
- ct[2] = cp[2];
- ct[3] = cp[3];
- cp[0] = ct[3];
- cp[1] = ct[2];
- cp[2] = ct[1];
- cp[3] = ct[0];
- cp += sizeof(uint32_t);
- }
+ count /= sizeof(uint32_t);
+ cp = (uint8_t *) buffer;
+ for (i = 0; i < count; i++) {
+ ct[0] = cp[0];
+ ct[1] = cp[1];
+ ct[2] = cp[2];
+ ct[3] = cp[3];
+ cp[0] = ct[3];
+ cp[1] = ct[2];
+ cp[2] = ct[1];
+ cp[3] = ct[0];
+ cp += sizeof(uint32_t);
+ }
#endif
}