Re: [Qemu-devel] [PATCH] block/gluster.c: Handle qdict_array_entries() failure

2017-06-05 Thread Jeff Cody
On Mon, Jun 05, 2017 at 06:01:38PM +0100, Peter Maydell wrote: > In qemu_gluster_parse_json(), the call to qdict_array_entries() > could return a negative error code, which we were ignoring > because we assigned the result to an unsigned variable. > Fix this by using the 'int' type instead, which

Re: [Qemu-devel] [PATCH] block/gluster.c: Handle qdict_array_entries() failure

2017-06-05 Thread Philippe Mathieu-Daudé
On 06/05/2017 02:01 PM, Peter Maydell wrote: In qemu_gluster_parse_json(), the call to qdict_array_entries() could return a negative error code, which we were ignoring because we assigned the result to an unsigned variable. Fix this by using the 'int' type instead, which matches the return type

Re: [Qemu-devel] [PATCH] block/gluster.c: Handle qdict_array_entries() failure

2017-06-05 Thread Eric Blake
On 06/05/2017 12:01 PM, Peter Maydell wrote: > In qemu_gluster_parse_json(), the call to qdict_array_entries() > could return a negative error code, which we were ignoring > because we assigned the result to an unsigned variable. > Fix this by using the 'int' type instead, which matches the >

[Qemu-devel] [PATCH] block/gluster.c: Handle qdict_array_entries() failure

2017-06-05 Thread Peter Maydell
In qemu_gluster_parse_json(), the call to qdict_array_entries() could return a negative error code, which we were ignoring because we assigned the result to an unsigned variable. Fix this by using the 'int' type instead, which matches the return type of qdict_array_entries() and also the type we