forked from auracaster/openocd
binarybuffer: Invert buf_cmp* return value and rename to buf_eq*
The current semantics are a bit confusing, as the return value looks like memcmp (0/false being equal) but the bool return type means one likely expects true to mean equal. Make this clearer by switching them out for buf_eq* functions that do that instead. Checkpatch-ignore: UNSPECIFIED_INT Change-Id: Iee0c5af794316aab5327cb9c168051fabd3bc1cb Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8490 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
5159c59915
commit
1ae6b07b45
@@ -172,8 +172,8 @@ static inline uint64_t buf_get_u64(const uint8_t *_buffer,
|
||||
*/
|
||||
uint32_t flip_u32(uint32_t value, unsigned width);
|
||||
|
||||
bool buf_cmp(const void *buf1, const void *buf2, unsigned size);
|
||||
bool buf_cmp_mask(const void *buf1, const void *buf2,
|
||||
bool buf_eq(const void *buf1, const void *buf2, unsigned size);
|
||||
bool buf_eq_mask(const void *buf1, const void *buf2,
|
||||
const void *mask, unsigned size);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user