DAPLink icon indicating copy to clipboard operation
DAPLink copied to clipboard

Unsigned int comparison to 0

Open b4yuan opened this issue 1 year ago • 0 comments

The following comparisons are evaluating an unsigned integer with 0, which will always evaluate to true, possibly masking a bug.

https://github.com/ARMmbed/DAPLink/blob/06fa0a9ca76a0f4b2732b030ebbcba9e6e20a708/source/daplink/flash_hal.c#L50 https://github.com/ARMmbed/DAPLink/blob/06fa0a9ca76a0f4b2732b030ebbcba9e6e20a708/source/daplink/flash_hal.c#L51 https://github.com/ARMmbed/DAPLink/blob/06fa0a9ca76a0f4b2732b030ebbcba9e6e20a708/source/board/lpc55s69_bl.c#L91 https://github.com/ARMmbed/DAPLink/blob/06fa0a9ca76a0f4b2732b030ebbcba9e6e20a708/source/hic_hal/nxp/lpc55xx/hic_init.c#L230

b4yuan avatar Aug 16 '23 12:08 b4yuan