aboutsummaryrefslogtreecommitdiff
path: root/util/readline.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2021-03-23 16:52:59 +0000
committerAlex Bennée <alex.bennee@linaro.org>2021-03-24 14:25:37 +0000
commit061d79097c080722e359db7c0d9cddc006cfb14d (patch)
treea174b564fb61388d09884f529c7f3db9befcc9ee /util/readline.c
parente5b024b93047db9126b382cbad49b70eea912dd6 (diff)
utils: Tighter tests for qemu_strtosz
Our tests were not validating the return value in all cases, nor was it guaranteeing our documented claim that 'res' is unchanged on error. For that matter, it wasn't as thorough as the existing tests for qemu_strtoi() and friends for proving that endptr and res are sanely set. Enhancing the test found one case where we violated our documentation: namely, when failing with EINVAL when endptr is NULL, we shouldn't modify res. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210317143325.2165821-2-eblake@redhat.com> Message-Id: <20210323165308.15244-14-alex.bennee@linaro.org>
Diffstat (limited to 'util/readline.c')
0 files changed, 0 insertions, 0 deletions