I'd like to see braces around single line conditionals, so that adding code if 
needed becomes easier.  I would be strongly against disallowing braces around 
single line conditionals.

I agree about the semi-colon after the closing brace.

-Fab

From: [email protected] 
[mailto:[email protected]] On Behalf Of Smith, Stan
Sent: Tuesday, September 21, 2010 10:54 AM
To: Alex Naslednikov; [email protected]
Subject: Re: [ofw] [Patch][IPoIB_NDIS6_CM] Spacing, code style and tabulation 
patch

Please see below.

________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Alex Naslednikov
Sent: Tuesday, September 21, 2010 5:30 AM
To: [email protected]
Subject: [ofw] [Patch][IPoIB_NDIS6_CM] Spacing, code style and tabulation patch
This patch replaces spaces by tabs and add brackets to "if" case
Index: B:/users/xalex/WoF-trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- B:/users/xalex/WoF-trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp        
(revision 2934)
+++ B:/users/xalex/WoF-trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp     
(working copy)
@@ -1980,7 +1980,8 @@
 __recv_cb_internal(
                IN                           const     ib_cq_handle_t           
                                                     h_cq,
                IN                                                           
void                                                                            
           *cq_context,
-    IN              uint32_t*                    p_recv_cnt );
+             IN                                                           
uint32_t                                                                        
       *p_recv_cnt
+             );


 static void
@@ -5797,8 +5798,9 @@
                cl_obj_unlock( &p_port->obj );

                if (p_port->send_mgr.pending_list.count <= 0)
+             {
                                return;
-
+             };

Braces around a single statement are not needed; some coding standards disallow 
this.
Additionally the ';' on the trailing brace is not needed.
Otherwise, OK.

                p_item =  cl_qlist_remove_head( &p_port->send_mgr.pending_list 
);
                while (p_item != cl_qlist_end(&p_port->send_mgr.pending_list))
                {
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to