[libvirt] [PATCH] add checking index for pci-bridge controller

Jincheng Miao jmiao at redhat.com
Mon Jul 8 03:52:44 UTC 2013


>2) That seems like a reasonable check for the index of *any* controller,
>not just pci-bridge. You could either put in a check right after the
>call to virStrToLong_i(), or alternately call virStrToLong_ui() instead
>(you would have to do it into a temporary variable, or change the
>definition of idx to be unsigned int (will size_t work here?). I'm not
>sure if there's a specific reason why idx was declared signed instead,
>as I haven't examined the code in detail, but it's very likely we could
>change it with no ill effect.

Thanks Laine, I will modify the code to call virStrToLong_ui(), and resend the patch.




More information about the libvir-list mailing list