diff --git a/.clang-format b/.clang-format index 6a23028c11..438aefb4c2 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,3 @@ -Language: Cpp MaxEmptyLinesToKeep: 1 SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false diff --git a/librz/arch/isa/avr/avr_il.c b/librz/arch/isa/avr/avr_il.c index 856668e592..09b41cd7cb 100644 --- a/librz/arch/isa/avr/avr_il.c +++ b/librz/arch/isa/avr/avr_il.c @@ -2219,7 +2219,7 @@ static RzILOpEffect *avr_il_neg(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis static RzILOpEffect *avr_il_or(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis *analysis) { RzILOpPure *x, *y; - RzILOpEffect * or, *S, *V, *N, *Z; + RzILOpEffect *or, *S, *V, *N, *Z; // Rd = Rd | Rr // changes S|V|N|Z ut16 Rd = aop->param[0]; @@ -2252,7 +2252,7 @@ static RzILOpEffect *avr_il_or(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis * static RzILOpEffect *avr_il_ori(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis *analysis) { RzILOpPure *x, *y; - RzILOpEffect * or, *S, *V, *N, *Z; + RzILOpEffect *or, *S, *V, *N, *Z; // Rd = Rd | K // changes S|V|N|Z ut16 Rd = aop->param[0]; diff --git a/librz/arch/isa/mips/il/common.c b/librz/arch/isa/mips/il/common.c index ad548eac12..0cbe14c730 100644 --- a/librz/arch/isa/mips/il/common.c +++ b/librz/arch/isa/mips/il/common.c @@ -139,7 +139,7 @@ static RzILOpEffect *mips_il_align(const csh *handle, const cs_insn *insn, const RzILOpPure *bp_8 = UN(32, IMM(3) << 3); // bp * 8 RzILOpPure *gprlen_bp_8 = UN(32, IMM(3) << 3); // gprlen - (bp * 8) - RzILOpPure * or = LOGOR(SHIFTL0(rt, bp_8), SHIFTR0(rs, gprlen_bp_8)); + RzILOpPure *or = LOGOR(SHIFTL0(rt, bp_8), SHIFTR0(rs, gprlen_bp_8)); if (gprlen > 32) { or = SIGNED(gprlen, or); } @@ -157,7 +157,7 @@ static RzILOpEffect *mips_il_dalign(const csh *handle, const cs_insn *insn, cons RzILOpPure *bp_8 = UN(gprlen, IMM(3) << 3); // bp * 8 RzILOpPure *gprlen_bp_8 = UN(gprlen, IMM(3) << 3); // gprlen - (bp * 8) - RzILOpPure * or = LOGOR(SHIFTL0(rt, bp_8), SHIFTR0(rs, gprlen_bp_8)); + RzILOpPure *or = LOGOR(SHIFTL0(rt, bp_8), SHIFTR0(rs, gprlen_bp_8)); return SETG(rd, or); } diff --git a/librz/arch/isa/sh/sh_il.c b/librz/arch/isa/sh/sh_il.c index 79aaea50b5..f2b04816ac 100644 --- a/librz/arch/isa/sh/sh_il.c +++ b/librz/arch/isa/sh/sh_il.c @@ -514,10 +514,10 @@ static RzILOpBool *sh_il_is_add_carry(RZ_OWN RzILOpPure *res, RZ_OWN RzILOpPure RzILOpBool *xr = AND(DUP(xmsb), DUP(nres)); // bit = xy | ry | xr - RzILOpBool * or = OR(xy, ry); + RzILOpBool *or = OR(xy, ry); or = OR(or, xr); - return or ; + return or; } /** @@ -549,10 +549,10 @@ static RzILOpBool *sh_il_is_sub_borrow(RZ_OWN RzILOpPure *res, RZ_OWN RzILOpPure RzILOpBool *rnx = AND(DUP(resmsb), DUP(nx)); // bit = nxy | rny | rnx - RzILOpBool * or = OR(nxy, rny); + RzILOpBool *or = OR(nxy, rny); or = OR(or, rnx); - return or ; + return or; } /** @@ -578,9 +578,9 @@ static RzILOpBool *sh_il_is_add_overflow(RZ_OWN RzILOpPure *res, RZ_OWN RzILOpPu // res & !x & !y RzILOpBool *rnxny = AND(AND(DUP(resmsb), INV(DUP(xmsb))), INV(DUP(ymsb))); // or = nrxy | rnxny - RzILOpBool * or = OR(nrxy, rnxny); + RzILOpBool *or = OR(nrxy, rnxny); - return or ; + return or; } /** @@ -606,9 +606,9 @@ static RzILOpBool *sh_il_is_sub_underflow(RZ_OWN RzILOpPure *res, RZ_OWN RzILOpP // res & !x & y RzILOpBool *rnxy = AND(AND(DUP(resmsb), INV(DUP(xmsb))), DUP(ymsb)); // or = nrxny | rnxy - RzILOpBool * or = OR(nrxny, rnxy); + RzILOpBool *or = OR(nrxny, rnxy); - return or ; + return or; } /* Instruction implementations */ diff --git a/librz/arch/isa/x86/common.c b/librz/arch/isa/x86/common.c index 572a9a85cd..a0456d84a8 100644 --- a/librz/arch/isa/x86/common.c +++ b/librz/arch/isa/x86/common.c @@ -793,10 +793,10 @@ RZ_IPI RzILOpBool *x86_il_is_add_carry(RZ_OWN RZ_NONNULL RzILOpPure *res, RZ_OWN RzILOpBool *xr = AND(DUP(xmsb), DUP(nres)); // bit = xy | ry | xr - RzILOpBool * or = OR(xy, ry); + RzILOpBool *or = OR(xy, ry); or = OR(or, xr); - return or ; + return or; } /** @@ -824,10 +824,10 @@ RZ_IPI RzILOpBool *x86_il_is_sub_borrow(RZ_OWN RZ_NONNULL RzILOpPure *res, RZ_OW RzILOpBool *rnx = AND(DUP(resmsb), DUP(nx)); // bit = nxy | rny | rnx - RzILOpBool * or = OR(nxy, rny); + RzILOpBool *or = OR(nxy, rny); or = OR(or, rnx); - return or ; + return or; } /** @@ -850,9 +850,9 @@ RZ_IPI RzILOpBool *x86_il_is_add_overflow(RZ_OWN RZ_NONNULL RzILOpPure *res, RZ_ // res & !x & !y RzILOpBool *rnxny = AND(AND(DUP(resmsb), INV(DUP(xmsb))), INV(DUP(ymsb))); // or = nrxy | rnxny - RzILOpBool * or = OR(nrxy, rnxny); + RzILOpBool *or = OR(nrxy, rnxny); - return or ; + return or; } /** @@ -875,9 +875,9 @@ RZ_IPI RzILOpBool *x86_il_is_sub_underflow(RZ_OWN RZ_NONNULL RzILOpPure *res, RZ // res & !x & y RzILOpBool *rnxy = AND(AND(DUP(resmsb), INV(DUP(xmsb))), DUP(ymsb)); // or = nrxny | rnxy - RzILOpBool * or = OR(nrxny, rnxy); + RzILOpBool *or = OR(nrxny, rnxy); - return or ; + return or; } /** diff --git a/librz/arch/p/analysis/analysis_x86_zydis.c b/librz/arch/p/analysis/analysis_x86_zydis.c index 51356208b7..ef1a5a4ec4 100644 --- a/librz/arch/p/analysis/analysis_x86_zydis.c +++ b/librz/arch/p/analysis/analysis_x86_zydis.c @@ -1656,16 +1656,16 @@ static void anop_esil(RzAnalysis *a, RzAnalysisOp *op, const ut8 *buf, int len, ut64 xor = 0; switch (bitsize) { case 8: - xor= 0xff; + xor = 0xff; break; case 16: - xor= 0xffff; + xor = 0xffff; break; case 32: - xor= 0xffffffff; + xor = 0xffffffff; break; case 64: - xor= 0xffffffffffffffff; + xor = 0xffffffffffffffff; break; default: RZ_LOG_ERROR("x86: unhandled neg bitsize %" PFMT32d "\n", bitsize); diff --git a/test/unit/test_bitvector.c b/test/unit/test_bitvector.c index fd6cdc51b6..3820cd9ce4 100644 --- a/test/unit/test_bitvector.c +++ b/test/unit/test_bitvector.c @@ -196,11 +196,11 @@ bool test_rz_bv_logic(void) { rz_bv_set(y, 7, true); // and : 0000 0001 - and= rz_bv_new(8); + and = rz_bv_new(8); rz_bv_set(and, 0, true); // xor : 1111 1100 - xor= rz_bv_new(8); + xor = rz_bv_new(8); rz_bv_toggle_all(xor); rz_bv_set(xor, 0, false); rz_bv_set(xor, 1, false); @@ -211,7 +211,7 @@ bool test_rz_bv_logic(void) { rz_bv_set(or, 1, false); // not of x : 1010 1010 - not= rz_bv_new(8); + not = rz_bv_new(8); rz_bv_set(not, 1, true); rz_bv_set(not, 3, true); rz_bv_set(not, 5, true);