diff options
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/binarybuffer.h | 2 | ||||
-rw-r--r-- | src/helper/jim.c | 10 |
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; |