Skip to content

Commit

Permalink
datapath-windows: Fix compilation error in release build.
Browse files Browse the repository at this point in the history
portNameLen to be used only in debug build.

Signed-off-by: Eitan Eliahu <[email protected]>
Acked-by: Ankur Sharma <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
EitanEliahu authored and blp committed Oct 16, 2014
1 parent 10ab94f commit dcd92cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datapath-windows/ovsext/Datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,8 +1960,9 @@ OvsSetVportCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
NdisAcquireRWLockWrite(gOvsSwitchContext->dispatchLock, &lockState, 0);
if (vportAttrs[OVS_VPORT_ATTR_NAME] != NULL) {
PSTR portName = NlAttrGet(vportAttrs[OVS_VPORT_ATTR_NAME]);
#ifdef DBG
UINT32 portNameLen = NlAttrGetSize(vportAttrs[OVS_VPORT_ATTR_NAME]);

#endif
/* the port name is expected to be null-terminated */
ASSERT(portName[portNameLen - 1] == '\0');

Expand Down

0 comments on commit dcd92cf

Please sign in to comment.