4 ms·
I find the most readable, unambiguous thing is to define explicit macros or constants, e.g. if(ckd_add(&result_add, a, b) == CKD_SUCCESS) { ... } or alterna
by dooglius 4y ago
I find the most readable, unambiguous thing is to define explicit macros or constants, e.g.
if(ckd_add(&result_add, a, b) == CKD_SUCCESS) { ... }
or alternatively,
if(CKD_SUCCESS(ckd_add(&result_add, a, b))) { ... }
- kevin_thibedeau 4y agoThe return value is the overflow condition so just name it CKD_OVERFLOW.