projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
8a5081c
)
Style cleanup
author
<brian@gir-3.local>
<>
Mon, 8 Sep 2008 23:30:35 +0000
(16:30 -0700)
committer
<brian@gir-3.local>
<>
Mon, 8 Sep 2008 23:30:35 +0000
(16:30 -0700)
libmemcached/byteorder.c
patch
|
blob
|
history
diff --git
a/libmemcached/byteorder.c
b/libmemcached/byteorder.c
index f407fa039c01f62fcf4405137a43d80c67796582..c020785bd2603963f68c31fb213299980d82350c 100644
(file)
--- a/
libmemcached/byteorder.c
+++ b/
libmemcached/byteorder.c
@@
-1,13
+1,14
@@
#include "common.h"
/* Byte swap a 64-bit number. */
#include "common.h"
/* Byte swap a 64-bit number. */
-static inline uint64_t swap64(uint64_t in) {
+static inline uint64_t swap64(uint64_t in)
+{
#ifndef BYTEORDER_BIG_ENDIAN
/* Little endian, flip the bytes around until someone makes a faster/better
* way to do this. */
uint64_t rv= 0;
#ifndef BYTEORDER_BIG_ENDIAN
/* Little endian, flip the bytes around until someone makes a faster/better
* way to do this. */
uint64_t rv= 0;
-
int i
= 0;
- for(
i= 0; i < 8; i
++)
+
uint8_t x
= 0;
+ for(
x= 0; x < 8; x
++)
{
rv= (rv << 8) | (in & 0xff);
in >>= 8;
{
rv= (rv << 8) | (in & 0xff);
in >>= 8;