aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/aice
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-07-03 22:10:55 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2021-07-24 10:38:19 +0100
commit54e699b2601036e384a124657aa1fbdd9ff2dc87 (patch)
tree69bb8d7842b6a8eb23d005fc51a1f414038d99a0 /src/jtag/aice
parent0a1f904707fa3c170032dd9dba8f2ef9207ff9b2 (diff)
downloadriscv-openocd-54e699b2601036e384a124657aa1fbdd9ff2dc87.zip
riscv-openocd-54e699b2601036e384a124657aa1fbdd9ff2dc87.tar.gz
riscv-openocd-54e699b2601036e384a124657aa1fbdd9ff2dc87.tar.bz2
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 <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6353 Tested-by: jenkins
Diffstat (limited to 'src/jtag/aice')
-rw-r--r--src/jtag/aice/aice_usb.c2
1 files changed, 1 insertions, 1 deletions
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");