diff options
author | Mario Six <mario.six@gdsys.cc> | 2017-01-11 16:00:59 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2017-02-01 09:04:11 +0100 |
commit | 4991b4f7f1e55fed161462cefca7fe483fd3e477 (patch) | |
tree | 7f523fa38e7ad321207b638c3980cc1edfa4d41b /doc/device-tree-bindings/input | |
parent | 79066ef8c9d3c56b46e41c290ae0f598a6d1c59f (diff) | |
download | u-boot-imx-4991b4f7f1e55fed161462cefca7fe483fd3e477.zip u-boot-imx-4991b4f7f1e55fed161462cefca7fe483fd3e477.tar.gz u-boot-imx-4991b4f7f1e55fed161462cefca7fe483fd3e477.tar.bz2 |
tools: kwbimage: Refactor line parsing and fix error
The function image_create_config_parse_oneline is pretty complex, and
since more parameters will be added to support secure booting, we
refactor the function to make it more readable.
Also, when a line contained just a keyword without any parameters,
strtok_r returned NULL, which was then indiscriminately fed into atoi,
causing a segfault. To correct this, we add a NULL check before feeding
the extracted token to atoi, and print an error message in case the
token is NULL.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'doc/device-tree-bindings/input')
0 files changed, 0 insertions, 0 deletions