diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-07-03 21:47:55 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-07-24 10:38:11 +0100 |
commit | 0a1f904707fa3c170032dd9dba8f2ef9207ff9b2 (patch) | |
tree | 485f649bde910405a08e1fd1ca8295aea078d80b /src/flash/nand | |
parent | 391782318723915bd259eadf9469251c13c8fa9c (diff) | |
download | riscv-openocd-0a1f904707fa3c170032dd9dba8f2ef9207ff9b2.zip riscv-openocd-0a1f904707fa3c170032dd9dba8f2ef9207ff9b2.tar.gz riscv-openocd-0a1f904707fa3c170032dd9dba8f2ef9207ff9b2.tar.bz2 |
openocd: remove NULL comparisons with checkpatch [2/2]
Patch generated automatically through a modified checkpatch that
detects the patterns
if (NULL == symbol)
if (NULL != symbol)
and through flags "--types COMPARISON_TO_NULL --fix-inplace".
The unmodified checkpatch detects this pattern as Yoda condition,
but it's odd fixing it as Yoda condition and then again as NULL
comparison. This triggered the modification to the script.
Change-Id: I5fe984a85e9c4fc799f049211797aef891ebce18
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6352
Tested-by: jenkins
Diffstat (limited to 'src/flash/nand')
-rw-r--r-- | src/flash/nand/arm_io.c | 2 | ||||
-rw-r--r-- | src/flash/nand/core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nand/arm_io.c b/src/flash/nand/arm_io.c index 705470e..2b0c081 100644 --- a/src/flash/nand/arm_io.c +++ b/src/flash/nand/arm_io.c @@ -55,7 +55,7 @@ static int arm_code_to_working_area(struct target *target, */ /* make sure we have a working area */ - if (NULL == *area) { + if (!*area) { retval = target_alloc_working_area(target, size, area); if (retval != ERROR_OK) { LOG_DEBUG("%s: no %d byte buffer", __func__, (int) size); diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c index d60e0d0..c1f1bc4 100644 --- a/src/flash/nand/core.c +++ b/src/flash/nand/core.c @@ -180,7 +180,7 @@ static struct nand_device *get_nand_device_by_name(const char *name) unsigned found = 0; struct nand_device *nand; - for (nand = nand_devices; NULL != nand; nand = nand->next) { + for (nand = nand_devices; nand; nand = nand->next) { if (strcmp(nand->name, name) == 0) return nand; if (!flash_driver_name_matches(nand->controller->name, name)) |