On 10/02/2017 10:40 AM, Alex Bennée wrote:
>> +    if (cap_insn == NULL) {
>> +        cap_insn = cs_malloc(*handle);
>> +        if (cap_insn == NULL) {
> 
> if (!cap_insn)?

Eh.  Depends on your philosophy, I suppose.  I'm not especially keen on !
except on boolean expressions.  Though of course both expressions are identical.

>> +        /* If the target memory is not consumed, go back for more... */
>> +        if (size != 0) {
>> +            /* ... taking care to move any remaining fractional insn
>> +               to the beginning of the buffer.  */
>> +            if (csize != 0) {
> 
> Given we are moving stuff and both size/csize are of size_t wouldn't if
> (size > 0) be clearer here?

*shrug* I dunno, would it?  For me, not obviously so.  Of course the two
expressions compile to the same code.


r~

Reply via email to