|
From: openocd-gerrit <ope...@us...> - 2026-04-06 16:23:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via bd17a59fd14e72a36930af4ab87d3f7b74887206 (commit)
via 0e41ac862d3280fa2fb948ba4dbf74d52cb25966 (commit)
from b215fe8621890e624a4bc0c56ccb4f9340009144 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bd17a59fd14e72a36930af4ab87d3f7b74887206
Author: Mark O'Donovan <sh...@po...>
Date: Tue Feb 24 20:41:43 2026 +0000
pld/gowin: move pointer deref after NULL check
Move pointer deref after NULL check.
Found by cppcheck.
Change-Id: Ic1b197fa43fa800cfec631614574dda46b137597
Signed-off-by: Mark O'Donovan <sh...@po...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9500
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
Reviewed-by: Daniel Anselmi <dan...@gm...>
diff --git a/src/pld/gowin.c b/src/pld/gowin.c
index bbc2fe15f..939e61060 100644
--- a/src/pld/gowin.c
+++ b/src/pld/gowin.c
@@ -172,11 +172,11 @@ static int gowin_read_fs_file(struct gowin_bit_file *bit_file, const char *filen
static int gowin_read_file(struct gowin_bit_file *bit_file, const char *filename, bool *is_fs)
{
- memset(bit_file, 0, sizeof(struct gowin_bit_file));
-
if (!filename || !bit_file)
return ERROR_COMMAND_SYNTAX_ERROR;
+ memset(bit_file, 0, sizeof(struct gowin_bit_file));
+
const char *file_suffix_pos = strrchr(filename, '.');
if (!file_suffix_pos) {
LOG_ERROR("Unable to detect filename suffix");
commit 0e41ac862d3280fa2fb948ba4dbf74d52cb25966
Author: Mark O'Donovan <sh...@po...>
Date: Tue Feb 24 20:44:43 2026 +0000
pld/gatemate: move pointer deref after NULL check
Move pointer deref after NULL check.
Found by cppcheck.
Change-Id: Ifdf40046cb1b03dbe7f445660b3349deae788e7b
Signed-off-by: Mark O'Donovan <sh...@po...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9499
Reviewed-by: Daniel Anselmi <dan...@gm...>
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/pld/gatemate.c b/src/pld/gatemate.c
index f35b39ad2..479f6d183 100644
--- a/src/pld/gatemate.c
+++ b/src/pld/gatemate.c
@@ -138,11 +138,11 @@ static int gatemate_read_cfg_file(struct gatemate_bit_file *bit_file, const char
static int gatemate_read_file(struct gatemate_bit_file *bit_file, const char *filename)
{
- memset(bit_file, 0, sizeof(struct gatemate_bit_file));
-
if (!filename || !bit_file)
return ERROR_COMMAND_SYNTAX_ERROR;
+ memset(bit_file, 0, sizeof(struct gatemate_bit_file));
+
/* check if binary .bit or ascii .cfg */
const char *file_suffix_pos = strrchr(filename, '.');
if (!file_suffix_pos) {
-----------------------------------------------------------------------
Summary of changes:
src/pld/gatemate.c | 4 ++--
src/pld/gowin.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|