On Sat, Sep 04, 2021 at 09:16:57PM +0000, [email protected] wrote: > This is an automated email from Gerrit. > > "Antonio Borneo <[email protected]>" just uploaded a new patch set to > Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6539 > > -- gerrit > > commit bed671d274408c4347facda48840b25a63b8f51a > Author: Antonio Borneo <[email protected]> > Date: Sat Sep 4 23:01:09 2021 +0200 > > openocd: remove last NULL comparisons > > The NULL pointers preceded by cast where not detected by the > scripting tools looking for NULL pointer comparison. > > Remove them and, while there, further simplify the code and apply > the other coding style rules. > > Change-Id: Ia7406122e07ef56ef311579ab0ee7ddb22c8e4b5 > Signed-off-by: Antonio Borneo <[email protected]> > > diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c > index 63bcda1f4..319ca380a 100644 > --- a/src/jtag/drivers/jlink.c > +++ b/src/jtag/drivers/jlink.c > @@ -573,7 +573,7 @@ static int jlink_open_device(uint32_t ifaces, bool > *found_device) > return ERROR_JTAG_INIT_FAILED; > } > > - use_usb_location = (jtag_usb_get_location() != NULL); > + use_usb_location = !!jtag_usb_get_location(); ^^
Is this intentional? Shouldn't it be '!jtag_usb_get_location()'?
