datapath-windows: Fix iterator in NlAttrParse()
[cascardo/ovs.git] / datapath-windows / CodingStyle
index 006adfd..3550cdb 100644 (file)
@@ -40,8 +40,14 @@ guidelines:
 
   Use lower case to begin the name of a variable.
 
+  Do not use '_' to begin the name of the variable. '_' is to be used to begin
+  the parameters of a pre-processor macro.
+
   Use upper case to begin the name of a function, enum, file name etc.
 
+  Static functions whose scope is limited to the file they are defined in can
+  be prefixed with '_'. This is not mandatory though.
+
   For types, use all upper case for all letters with words separated by '_'. If
   camel casing is preferred, use  upper case for the first letter.
 
@@ -72,6 +78,13 @@ OvsDetectTunnelRxPkt(POVS_FORWARDING_CONTEXT ovsFwdCtx,
     return FALSE;
 }
 
+  For declaring variables of pointer type, use of the pointer data type
+prefixed with 'P' is preferred over using '*'. This is not mandatory though,
+and is only prescribed since it is a common practice in Windows.
+
+  Example, #1 is preferred over #2 though #2 is also equally correct:
+  1. PNET_BUFFER_LIST curNbl;
+  2. NET_BUFFER_LIST *curNbl;
 
 COMMENTS