qapi: treat all negative return of strtosz_suffix() as error
commitcb45de6798956975c4b13a6233f7a00d2239b61a
authorAmos Kong <akong@redhat.com>
Mon, 28 Apr 2014 05:53:49 +0000 (28 13:53 +0800)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 8 May 2014 18:19:58 +0000 (8 14:19 -0400)
treee39974a4bb81e0158c40c46c8a43548a21320f3d
parenta719a27c824ea5e70f5bf6f3c8d13a8c1d6b1bfe
qapi: treat all negative return of strtosz_suffix() as error

strtosz_suffix() might return negative error, this patch fixes
the error handling.

This patch also changes to handle error in the if statement
rather than handle success specially, this will make this use
of strtosz_suffix consistent with all other uses.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi/opts-visitor.c