From 7feb3393bac71abaef82862e8a44d24868265c9d Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Wed, 3 Oct 2012 15:46:55 -0400 Subject: Correct checking of virStrcpyStatic() return value 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 --- 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 d774fb1ad..ac7aa5fcb 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", -- cgit v1.2.3-65-gdbad