riscv-openocd/src
Antonio Borneo bfd3110e59 binarybuffer: str_to_buf(): simplify it and fix scan-build error
The function str_to_buf() can be simplified by writing directly
the intermediate results in the output buffer.
Such simplification improves the readability and also makes
scan-build happy, as it does not trigger anymore the warning:
	src/helper/binarybuffer.c:328:8: warning: Use of memory
	allocated with size zero [unix.Malloc]
		if ((b256_buf[(buf_len / 8)] & mask) != 0x0) {

Change-Id: I1cef9a1ec5ff0e5841ba582610f273e89e7a81da
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8396
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Tested-by: jenkins
2024-08-25 12:36:29 +00:00
..
flash flash/startup.tcl: Tidy flash program preverify documentation 2024-07-28 13:36:58 +00:00
helper binarybuffer: str_to_buf(): simplify it and fix scan-build error 2024-08-25 12:36:29 +00:00
jtag helper: command: drop radix parameter from command_parse_str_to_buf() 2024-08-25 12:35:47 +00:00
pld pld/intel: remove idcodes from intel.c 2024-06-15 14:25:05 +00:00
rtos rtos/hwthread: derive threadid from SMP index 2024-07-13 22:31:16 +00:00
rtt rtt/tcl: Fix line indentation 2023-11-18 11:38:27 +00:00
server server/telnet: Always allow 'exit' command 2024-08-06 14:31:29 +00:00
svf svf: make command 'svf' syntax consistent 2023-03-25 18:09:06 +00:00
target helper: command: drop radix parameter from command_parse_str_to_buf() 2024-08-25 12:35:47 +00:00
transport transport: Remove echo in transport selection 2024-08-02 16:08:32 +00:00
xsvf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
Makefile.am configure: Use pkg-config for jimtcl 2024-08-02 15:59:07 +00:00
hello.c hello: include hello.h 2023-05-18 10:13:41 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
openocd.c openocd: rewrite command 'version' as COMMAND_HANDLER 2023-03-25 18:10:54 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00