From 54e699b2601036e384a124657aa1fbdd9ff2dc87 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sat, 3 Jul 2021 22:10:55 +0200 Subject: openocd: manually remove NULL comparisons For the remaining NULL comparisons, remove then manually. While there, make more readable a loop, by moving the assigment out of the loop condition. Change-Id: I44193aaa95813156a3a79c16b80e1ad333dc1eaf Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6353 Tested-by: jenkins --- src/jtag/aice/aice_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jtag/aice') diff --git a/src/jtag/aice/aice_usb.c b/src/jtag/aice/aice_usb.c index 8d7f38b..53d2838 100644 --- a/src/jtag/aice/aice_usb.c +++ b/src/jtag/aice/aice_usb.c @@ -2218,7 +2218,7 @@ static int aice_execute_custom_script(const char *script) if (!script_fd) { return ERROR_FAIL; } else { - while (fgets(line_buffer, LINE_BUFFER_SIZE, script_fd) != NULL) { + while (fgets(line_buffer, LINE_BUFFER_SIZE, script_fd)) { /* execute operations */ set_op = false; op_str = strstr(line_buffer, "set"); -- cgit v1.1