openocd/src
Antonio Borneo 28c24a5c41 openocd: fix simple cases of Yoda condition
There are ~900 Yoda conditions to be aligned to the coding style.
For recurrent Yoda conditions it's preferable using a trivial
script in order to minimize the review effort.
E.g. comparison of uppercase macro/enum with lowercase variable:
	- ...(ERROR_OK == retval)...
	+ ...(retval == ERROR_OK)...

Patch generated automatically with the command:
	sed -i \
	's/(\([A-Z][A-Z0-9_]*\) \([=!]=\) \([a-z][a-z0-9_]*\))/(\3 \2 \1)/g' \
	$(find src/ -type f)

While there, remove the braces {} around a single statement block
to prevent warning from checkpatch.

Change-Id: If585b0a4b4578879c87b2dd74d9e0025e275ec6b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6354
Tested-by: jenkins
Reviewed-by: Xiang W <wxjstz@126.com>
2021-07-20 14:55:24 +01:00
..
flash openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
helper openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
jtag openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
pld openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
rtos openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
rtt openocd: fix doxygen parameters of functions 2021-01-13 11:33:53 +00:00
server openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
svf openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
target openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
transport Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
xsvf openocd: fix some minor typo 2021-05-22 10:06:51 +01:00
hello.c openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
Makefile.am build: Fix out-of-tree with --disable-dependency-tracking configure flag 2021-04-05 23:24:14 +01:00
openocd.c openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00