]> xenbits.xensource.com Git - libvirt.git/commitdiff
Correct checking of virStrcpyStatic() return value
authorKyle Mestery <kmestery@cisco.com>
Wed, 3 Oct 2012 19:46:55 +0000 (15:46 -0400)
committerLaine Stump <laine@laine.org>
Thu, 4 Oct 2012 01:17:13 +0000 (21:17 -0400)
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@cisco.com>
src/util/virnetdevvportprofile.c

index d774fb1add47fc469a0b0117300bc2d925896627..ac7aa5fcbf4038d7ae18b2c7610ee5678c4a97f1 100644 (file)
@@ -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",