On 05/11/2015 10:08 PM, Martin Kletzander wrote:
On Mon, May 11, 2015 at 08:59:37PM +0800, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1220265
Pass the return value to an enum directly is not safe.
When pass a invalid @ioeventfd and virTristateSwitchTypeFromString
return -1
https://bugzilla.redhat.com/show_bug.cgi?id=1220265
Pass the return value to an enum directly is not safe.
When pass a invalid @ioeventfd and virTristateSwitchTypeFromString
return -1 to def-msi.ioeventfd, and this value transform to
4294967295, so no error when the parse failed.
To fix this
On Mon, May 11, 2015 at 08:59:37PM +0800, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1220265
Pass the return value to an enum directly is not safe.
When pass a invalid @ioeventfd and virTristateSwitchTypeFromString
return -1 to def-msi.ioeventfd, and this value transform to