summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:41:13 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:41:13 +0000
commitaea6815462d3302f7f8b6576f59320d5f5985642 (patch)
tree24db5c404a4568beabe33487235dc2befd1e0421 /src/helper
parent0e2c2fe1d1eec5482078147d551215a58604cc3a (diff)
downloadopenocd+libswd-aea6815462d3302f7f8b6576f59320d5f5985642.tar.gz
openocd+libswd-aea6815462d3302f7f8b6576f59320d5f5985642.tar.bz2
openocd+libswd-aea6815462d3302f7f8b6576f59320d5f5985642.tar.xz
openocd+libswd-aea6815462d3302f7f8b6576f59320d5f5985642.zip
- Fixes '<<' whitespace
- Replace ')\(<<\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(<<\)(' with '\1 \2 ('. - Replace '\(\w\)\(<<\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/binarybuffer.h2
-rw-r--r--src/helper/jim.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/helper/binarybuffer.h b/src/helper/binarybuffer.h
index 81d3f63a..d1fcd8b9 100644
--- a/src/helper/binarybuffer.h
+++ b/src/helper/binarybuffer.h
@@ -55,7 +55,7 @@ static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, un
{
if ((num==32) && (first==0))
{
- return (((uint32_t)buffer[3])<<24)|(((uint32_t)buffer[2])<<16)|(((uint32_t)buffer[1])<<8)|(((uint32_t)buffer[0])<<0);
+ return (((uint32_t)buffer[3]) << 24)|(((uint32_t)buffer[2]) << 16)|(((uint32_t)buffer[1]) << 8)|(((uint32_t)buffer[0]) << 0);
} else
{
uint32_t result = 0;
diff --git a/src/helper/jim.c b/src/helper/jim.c
index c0425b98..9c862150 100644
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -662,7 +662,7 @@ unsigned int Jim_GenHashFunction(const unsigned char *buf, int len)
{
unsigned int h = 0;
while (len--)
- h += (h<<3)+*buf++;
+ h += (h << 3)+*buf++;
return h;
}
@@ -6957,7 +6957,7 @@ int Jim_EvalExpression(Jim_Interp *interp, Jim_Obj *exprObjPtr,
case JIM_EXPROP_GT: wC = wA>wB; break;
case JIM_EXPROP_LTE: wC = wA <= wB; break;
case JIM_EXPROP_GTE: wC = wA >= wB; break;
- case JIM_EXPROP_LSHIFT: wC = wA<<wB; break;
+ case JIM_EXPROP_LSHIFT: wC = wA << wB; break;
case JIM_EXPROP_RSHIFT: wC = wA >> wB; break;
case JIM_EXPROP_NUMEQ: wC = wA==wB; break;
case JIM_EXPROP_NUMNE: wC = wA != wB; break;
@@ -6996,7 +6996,7 @@ int Jim_EvalExpression(Jim_Interp *interp, Jim_Obj *exprObjPtr,
wC = _rotl(uA,(unsigned long)wB);
#else
const unsigned int S = sizeof(unsigned long) * 8;
- wC = (unsigned long)((uA<<wB)|(uA >> (S-wB)));
+ wC = (unsigned long)((uA << wB)|(uA >> (S-wB)));
#endif
break;
}
@@ -7006,7 +7006,7 @@ int Jim_EvalExpression(Jim_Interp *interp, Jim_Obj *exprObjPtr,
wC = _rotr(uA,(unsigned long)wB);
#else
const unsigned int S = sizeof(unsigned long) * 8;
- wC = (unsigned long)((uA >> wB)|(uA<<(S-wB)));
+ wC = (unsigned long)((uA >> wB)|(uA << (S-wB)));
#endif
break;
}
@@ -8038,7 +8038,7 @@ badfmt:
return JIM_ERR;
}
-#define JIM_MATCHVER_EXACT (1<<JIM_PRIV_FLAG_SHIFT)
+#define JIM_MATCHVER_EXACT (1 << JIM_PRIV_FLAG_SHIFT)
static int JimPackageMatchVersion(int needed, int actual, int flags)
{
if (needed == JIM_PKG_ANY_VERSION) return 1;