From: OpenOCD-Gerrit <ope...@us...> - 2020-04-12 21:02:06
|
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 27d04d42842b31a3eb83de965ba7f3dc0fac3142 (commit) from 21b9a0e1e33f371026d6497ab3ce81ed9ea73db4 (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 27d04d42842b31a3eb83de965ba7f3dc0fac3142 Author: Antonio Borneo <bor...@gm...> Date: Sun Mar 29 23:19:29 2020 +0200 sysfsgpio: minor fix for bool types Return bool value in functions that return bool. Change return type to bool to function is_gpio_valid(). Change-Id: Ic2e62be737772b22e69881c034956549f659370b Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5552 Tested-by: jenkins Reviewed-by: Marc Schink <de...@za...> diff --git a/src/jtag/drivers/sysfsgpio.c b/src/jtag/drivers/sysfsgpio.c index bf33767c8..c398d5384 100644 --- a/src/jtag/drivers/sysfsgpio.c +++ b/src/jtag/drivers/sysfsgpio.c @@ -61,7 +61,7 @@ * * Assume here that there will be less than 10000 gpios on a system */ -static int is_gpio_valid(int gpio) +static bool is_gpio_valid(int gpio) { return gpio >= 0 && gpio < 10000; } @@ -603,23 +603,23 @@ static void cleanup_all_fds(void) static bool sysfsgpio_jtag_mode_possible(void) { if (!is_gpio_valid(tck_gpio)) - return 0; + return false; if (!is_gpio_valid(tms_gpio)) - return 0; + return false; if (!is_gpio_valid(tdi_gpio)) - return 0; + return false; if (!is_gpio_valid(tdo_gpio)) - return 0; - return 1; + return false; + return true; } static bool sysfsgpio_swd_mode_possible(void) { if (!is_gpio_valid(swclk_gpio)) - return 0; + return false; if (!is_gpio_valid(swdio_gpio)) - return 0; - return 1; + return false; + return true; } static int sysfsgpio_init(void) ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/sysfsgpio.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) hooks/post-receive -- Main OpenOCD repository |