diff options
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r-- | qemu-io-cmds.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 973eb94774..01a6dc6fbc 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -137,10 +137,14 @@ static char **breakline(char *input, int *count) static int64_t cvtnum(const char *s) { - int64_t ret; + int err; + int64_t value; - ret = qemu_strtosz(s, NULL); - return ret; + err = qemu_strtosz(s, NULL, &value); + if (err < 0) { + return err; + } + return value; } static void print_cvtnum_err(int64_t rc, const char *arg) |