[ovs-dev] [PATCH] datapath-windows: trivial formatting changes in Netlink.c

Nithin Raju nithin at vmware.com
Tue Aug 26 16:02:07 UTC 2014


---
 datapath-windows/ovsext/Netlink.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/datapath-windows/ovsext/Netlink.c b/datapath-windows/ovsext/Netlink.c
index 1c8d054..7b50221 100644
--- a/datapath-windows/ovsext/Netlink.c
+++ b/datapath-windows/ovsext/Netlink.c
@@ -251,8 +251,8 @@ NlAttrGet(const PNL_ATTR nla)
  * first byte of the payload.
  * ---------------------------------------------------------------------------
  */
-const
-PVOID NlAttrGetUnspec(const PNL_ATTR nla, UINT32 size)
+const PVOID
+NlAttrGetUnspec(const PNL_ATTR nla, UINT32 size)
 {
     UNREFERENCED_PARAMETER(size);
     ASSERT(nla->nlaLen >= NLA_HDRLEN + size);
@@ -408,20 +408,22 @@ NlAttrFindNested(const PNL_ATTR nla, UINT16 type)
  * attribute type validation parameters.
  * 'nla_offset' should be NLMSG_HDRLEN + GENL_HDRLEN + OVS_HEADER
  *
- * Returns NDIS_STATUS_SUCCESS normally.  Fails only if packet data cannot be accessed
+ * Returns NDIS_STATUS_SUCCESS normally.  Fails only if packet data cannot
+ * be accessed
  * (e.g. if Pkt_CopyBytesOut() returns an error).
  *----------------------------------------------------------------------------
  */
-BOOLEAN NlAttrParse(const PNL_MSG_HDR nlMsg, UINT32 attrOffset,
-                    const NL_POLICY policy[],
-                    PNL_ATTR attrs[], UINT32 n_attrs)
+BOOLEAN
+NlAttrParse(const PNL_MSG_HDR nlMsg, UINT32 attrOffset,
+            const NL_POLICY policy[],
+            PNL_ATTR attrs[], UINT32 n_attrs)
 {
     PNL_ATTR nla;
     UINT32 left;
     UINT32 iter;
     BOOLEAN ret = FALSE;
 
-    memset(attrs, 0, n_attrs * sizeof *attrs);
+    RtlZeroMemory(attrs, n_attrs * sizeof *attrs);
 
     if ((NlMsgSize(nlMsg) < attrOffset) || (!(NlMsgAttrLen(nlMsg)))) {
         OVS_LOG_WARN("No attributes in nlMsg: %p at offset: %d",
-- 
1.7.4.1




More information about the dev mailing list