[libvirt] [PATCH] Correct checking of virStrcpyStatic() return value
Laine Stump
laine at laine.org
Thu Oct 4 01:30:48 UTC 2012
On 10/03/2012 03:46 PM, Kyle Mestery wrote:
> Correct the check for the return value of virStrcpyStatic()
> when copying port-profile names. Fixes Open vSwitch ports
> which utilize port-profiles from network definitions.
>
> Signed-off-by: Kyle Mestery <kmestery at cisco.com>
> ---
> src/util/virnetdevvportprofile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
> index d774fb1..ac7aa5f 100644
> --- a/src/util/virnetdevvportprofile.c
> +++ b/src/util/virnetdevvportprofile.c
> @@ -374,7 +374,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig,
> orig->profileID, mods->profileID);
> return -1;
> }
> - if (virStrcpyStatic(orig->profileID, mods->profileID)) {
> + if (virStrcpyStatic(orig->profileID, mods->profileID) == NULL) {
> /* this should never happen - it indicates mods->profileID
> * isn't properly null terminated. */
> virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
ACK and pushed. Thanks!
More information about the libvir-list
mailing list