treewide: Convert tabs to spaces in C source files written in OVS style.
authorBen Pfaff <blp@nicira.com>
Fri, 23 Mar 2012 18:43:54 +0000 (11:43 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 23 Mar 2012 19:20:07 +0000 (12:20 -0700)
The Open vSwitch C style doesn't use hard tabs.

This commit doesn't touch files written in kernel style or that are
imported from other projects where we want to minimize changes from
upstream (the sflow files).

Reported-by: Mehak Mahajan <mmahajan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
include/openvswitch/types.h
lib/netlink-protocol.h
lib/sha1.c
lib/sha1.h
lib/unaligned.h
ofproto/ofproto.c
ofproto/ofproto.h

index 90a32f5..ad05757 100644 (file)
@@ -48,16 +48,16 @@ typedef __be64 ovs_be64;
  * boundary.  */
 typedef struct {
 #ifdef WORDS_BIGENDIAN
-       uint32_t hi, lo;
+        uint32_t hi, lo;
 #else
-       uint32_t lo, hi;
+        uint32_t lo, hi;
 #endif
 } ovs_32aligned_u64;
 
 /* A 64-bit value, in network byte order, that is only aligned on a 32-bit
  * boundary. */
 typedef struct {
-       ovs_be32 hi, lo;
+        ovs_be32 hi, lo;
 } ovs_32aligned_be64;
 
 #endif /* openvswitch/types.h */
index 521c5bf..3f4ce35 100644 (file)
@@ -149,9 +149,9 @@ enum {
 
 /* These were introduced all together in 2.6.24. */
 #ifndef NLA_TYPE_MASK
-#define NLA_F_NESTED           (1 << 15)
-#define NLA_F_NET_BYTEORDER    (1 << 14)
-#define NLA_TYPE_MASK          ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
+#define NLA_F_NESTED        (1 << 15)
+#define NLA_F_NET_BYTEORDER (1 << 14)
+#define NLA_TYPE_MASK       ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
 #endif
 
 /* These were introduced all together in 2.6.14.  (We want our programs to
@@ -170,10 +170,10 @@ enum {
 #define CTRL_ATTR_MCAST_GROUPS 7
 
 enum {
-       CTRL_ATTR_MCAST_GRP_UNSPEC,
-       CTRL_ATTR_MCAST_GRP_NAME,
-       CTRL_ATTR_MCAST_GRP_ID,
-       __CTRL_ATTR_MCAST_GRP_MAX,
+    CTRL_ATTR_MCAST_GRP_UNSPEC,
+    CTRL_ATTR_MCAST_GRP_NAME,
+    CTRL_ATTR_MCAST_GRP_ID,
+    __CTRL_ATTR_MCAST_GRP_MAX,
 };
 
 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
index cdccab3..6205e50 100644 (file)
 /* This software also makes use of the following component:
  *
  * NIST Secure Hash Algorithm
- *     heavily modified by Uwe Hollerbach uh@alumni.caltech edu
- *     from Peter C. Gutmann's implementation as found in
- *     Applied Cryptography by Bruce Schneier
- *     This code is hereby placed in the public domain
+ *      heavily modified by Uwe Hollerbach uh@alumni.caltech edu
+ *  from Peter C. Gutmann's implementation as found in
+ *  Applied Cryptography by Bruce Schneier
+ *  This code is hereby placed in the public domain
  */
 
 #include <config.h>
@@ -65,10 +65,10 @@ f4(uint32_t x, uint32_t y, uint32_t z)
 }
 
 /* SHA constants */
-#define CONST1         0x5a827999L
-#define CONST2         0x6ed9eba1L
-#define CONST3         0x8f1bbcdcL
-#define CONST4         0xca62c1d6L
+#define CONST1      0x5a827999L
+#define CONST2      0x6ed9eba1L
+#define CONST3      0x8f1bbcdcL
+#define CONST4      0xca62c1d6L
 
 /* 32-bit rotate */
 static inline uint32_t
@@ -157,19 +157,19 @@ maybe_byte_reverse(uint32_t *buffer OVS_UNUSED, int count OVS_UNUSED)
     int i;
     uint8_t ct[4], *cp;
 
-       count /= sizeof(uint32_t);
-       cp = (uint8_t *) buffer;
-       for (i = 0; i < count; i++) {
-           ct[0] = cp[0];
-           ct[1] = cp[1];
-           ct[2] = cp[2];
-           ct[3] = cp[3];
-           cp[0] = ct[3];
-           cp[1] = ct[2];
-           cp[2] = ct[1];
-           cp[3] = ct[0];
-           cp += sizeof(uint32_t);
-       }
+    count /= sizeof(uint32_t);
+    cp = (uint8_t *) buffer;
+    for (i = 0; i < count; i++) {
+        ct[0] = cp[0];
+        ct[1] = cp[1];
+        ct[2] = cp[2];
+        ct[3] = cp[3];
+        cp[0] = ct[3];
+        cp[1] = ct[2];
+        cp[2] = ct[1];
+        cp[3] = ct[0];
+        cp += sizeof(uint32_t);
+    }
 #endif
 }
 
index 9a37277..9015104 100644 (file)
  * limitations under the License.
  */
 /* NIST Secure Hash Algorithm
- *     heavily modified by Uwe Hollerbach uh@alumni.caltech edu
- *     from Peter C. Gutmann's implementation as found in
- *     Applied Cryptography by Bruce Schneier
- *     This code is hereby placed in the public domain
+ *  heavily modified by Uwe Hollerbach uh@alumni.caltech edu
+ *  from Peter C. Gutmann's implementation as found in
+ *  Applied Cryptography by Bruce Schneier
+ *  This code is hereby placed in the public domain
  */
 
 #ifndef SHA1_H
index a5ae4be..87b060c 100644 (file)
@@ -178,15 +178,15 @@ put_unaligned_u64(uint64_t *p, uint64_t x)
 static inline uint64_t
 get_32aligned_u64(const ovs_32aligned_u64 *x)
 {
-       return ((uint64_t) x->hi << 32) | x->lo;
+    return ((uint64_t) x->hi << 32) | x->lo;
 }
 
 /* Stores 'value' in 'x'. */
 static inline void
 put_32aligned_u64(ovs_32aligned_u64 *x, uint64_t value)
 {
-       x->hi = value >> 32;
-       x->lo = value;
+    x->hi = value >> 32;
+    x->lo = value;
 }
 
 #ifndef __CHECKER__
@@ -195,9 +195,9 @@ static inline ovs_be64
 get_32aligned_be64(const ovs_32aligned_be64 *x)
 {
 #ifdef WORDS_BIGENDIAN
-       return ((ovs_be64) x->hi << 32) | x->lo;
+    return ((ovs_be64) x->hi << 32) | x->lo;
 #else
-       return ((ovs_be64) x->lo << 32) | x->hi;
+    return ((ovs_be64) x->lo << 32) | x->hi;
 #endif
 }
 
@@ -206,8 +206,8 @@ static inline void
 put_32aligned_be64(ovs_32aligned_be64 *x, ovs_be64 value)
 {
 #if WORDS_BIGENDIAN
-       x->hi = value >> 32;
-       x->lo = value;
+    x->hi = value >> 32;
+    x->lo = value;
 #else
     x->hi = value;
     x->lo = value >> 32;
index b554cc9..aa97124 100644 (file)
@@ -1943,7 +1943,7 @@ handle_set_config(struct ofconn *ofconn, const struct ofp_switch_config *osc)
         }
     }
     ofconn_set_invalid_ttl_to_controller(ofconn,
-                        (flags & OFPC_INVALID_TTL_TO_CONTROLLER));
+             (flags & OFPC_INVALID_TTL_TO_CONTROLLER));
 
     ofconn_set_miss_send_len(ofconn, ntohs(osc->miss_send_len));
 
index adbb80d..538c2c6 100644 (file)
@@ -185,8 +185,8 @@ int ofproto_port_dump_done(struct ofproto_port_dump *);
           : (ofproto_port_dump_done(DUMP), false));         \
         )
 
-#define OFPROTO_FLOW_EVICTON_THRESHOLD_DEFAULT 1000
-#define OFPROTO_FLOW_EVICTION_THRESHOLD_MIN    100
+#define OFPROTO_FLOW_EVICTON_THRESHOLD_DEFAULT  1000
+#define OFPROTO_FLOW_EVICTION_THRESHOLD_MIN 100
 
 int ofproto_port_add(struct ofproto *, struct netdev *, uint16_t *ofp_portp);
 int ofproto_port_del(struct ofproto *, uint16_t ofp_port);