diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2023-08-06 11:34:28 +0200 |
---|---|---|
committer | Evgeniy Naydanov <109669442+en-sc@users.noreply.github.com> | 2024-01-29 13:36:27 +0300 |
commit | d645030394615d7eadd9d21302193c53520e625b (patch) | |
tree | 7071700266bcf3194fbcaf3106579c2a7c725b53 /src/jtag/interfaces.h | |
parent | be81c6ffe018572012f69c19782cca7477acf924 (diff) | |
download | riscv-openocd-d645030394615d7eadd9d21302193c53520e625b.zip riscv-openocd-d645030394615d7eadd9d21302193c53520e625b.tar.gz riscv-openocd-d645030394615d7eadd9d21302193c53520e625b.tar.bz2 |
helper/command: simplify exec_command()
The jimtcl interpreter guarantees that the Jim objects in argv[]
are not deallocated during the command execution. Thus, there is
no need to copy the string content of argv[].
Simplify exec_command() by inlining its two sub-functions and
dropping the strdup().
While there, add a LOG_ERROR() for out of memory.
Change-Id: I3e21ed7da50ca0bd072edbd49fca9740c81f95b0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8055
Tested-by: jenkins
Diffstat (limited to 'src/jtag/interfaces.h')
0 files changed, 0 insertions, 0 deletions