2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-04 00:05:15 +00:00

treewide: Convert tabs to spaces in C source files written in OVS style.

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>
This commit is contained in:
Ben Pfaff
2012-03-23 11:43:54 -07:00
parent ada3428f09
commit 05fe17646f
7 changed files with 45 additions and 45 deletions

View File

@@ -48,16 +48,16 @@ typedef __be64 ovs_be64;
* boundary. */ * boundary. */
typedef struct { typedef struct {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
uint32_t hi, lo; uint32_t hi, lo;
#else #else
uint32_t lo, hi; uint32_t lo, hi;
#endif #endif
} ovs_32aligned_u64; } ovs_32aligned_u64;
/* A 64-bit value, in network byte order, that is only aligned on a 32-bit /* A 64-bit value, in network byte order, that is only aligned on a 32-bit
* boundary. */ * boundary. */
typedef struct { typedef struct {
ovs_be32 hi, lo; ovs_be32 hi, lo;
} ovs_32aligned_be64; } ovs_32aligned_be64;
#endif /* openvswitch/types.h */ #endif /* openvswitch/types.h */

View File

@@ -149,9 +149,9 @@ enum {
/* These were introduced all together in 2.6.24. */ /* These were introduced all together in 2.6.24. */
#ifndef NLA_TYPE_MASK #ifndef NLA_TYPE_MASK
#define NLA_F_NESTED (1 << 15) #define NLA_F_NESTED (1 << 15)
#define NLA_F_NET_BYTEORDER (1 << 14) #define NLA_F_NET_BYTEORDER (1 << 14)
#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) #define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
#endif #endif
/* These were introduced all together in 2.6.14. (We want our programs to /* 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 #define CTRL_ATTR_MCAST_GROUPS 7
enum { enum {
CTRL_ATTR_MCAST_GRP_UNSPEC, CTRL_ATTR_MCAST_GRP_UNSPEC,
CTRL_ATTR_MCAST_GRP_NAME, CTRL_ATTR_MCAST_GRP_NAME,
CTRL_ATTR_MCAST_GRP_ID, CTRL_ATTR_MCAST_GRP_ID,
__CTRL_ATTR_MCAST_GRP_MAX, __CTRL_ATTR_MCAST_GRP_MAX,
}; };
#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)

View File

@@ -23,10 +23,10 @@
/* This software also makes use of the following component: /* This software also makes use of the following component:
* *
* NIST Secure Hash Algorithm * NIST Secure Hash Algorithm
* heavily modified by Uwe Hollerbach uh@alumni.caltech edu * heavily modified by Uwe Hollerbach uh@alumni.caltech edu
* from Peter C. Gutmann's implementation as found in * from Peter C. Gutmann's implementation as found in
* Applied Cryptography by Bruce Schneier * Applied Cryptography by Bruce Schneier
* This code is hereby placed in the public domain * This code is hereby placed in the public domain
*/ */
#include <config.h> #include <config.h>
@@ -65,10 +65,10 @@ f4(uint32_t x, uint32_t y, uint32_t z)
} }
/* SHA constants */ /* SHA constants */
#define CONST1 0x5a827999L #define CONST1 0x5a827999L
#define CONST2 0x6ed9eba1L #define CONST2 0x6ed9eba1L
#define CONST3 0x8f1bbcdcL #define CONST3 0x8f1bbcdcL
#define CONST4 0xca62c1d6L #define CONST4 0xca62c1d6L
/* 32-bit rotate */ /* 32-bit rotate */
static inline uint32_t static inline uint32_t
@@ -157,19 +157,19 @@ maybe_byte_reverse(uint32_t *buffer OVS_UNUSED, int count OVS_UNUSED)
int i; int i;
uint8_t ct[4], *cp; uint8_t ct[4], *cp;
count /= sizeof(uint32_t); count /= sizeof(uint32_t);
cp = (uint8_t *) buffer; cp = (uint8_t *) buffer;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
ct[0] = cp[0]; ct[0] = cp[0];
ct[1] = cp[1]; ct[1] = cp[1];
ct[2] = cp[2]; ct[2] = cp[2];
ct[3] = cp[3]; ct[3] = cp[3];
cp[0] = ct[3]; cp[0] = ct[3];
cp[1] = ct[2]; cp[1] = ct[2];
cp[2] = ct[1]; cp[2] = ct[1];
cp[3] = ct[0]; cp[3] = ct[0];
cp += sizeof(uint32_t); cp += sizeof(uint32_t);
} }
#endif #endif
} }

View File

@@ -20,10 +20,10 @@
* limitations under the License. * limitations under the License.
*/ */
/* NIST Secure Hash Algorithm /* NIST Secure Hash Algorithm
* heavily modified by Uwe Hollerbach uh@alumni.caltech edu * heavily modified by Uwe Hollerbach uh@alumni.caltech edu
* from Peter C. Gutmann's implementation as found in * from Peter C. Gutmann's implementation as found in
* Applied Cryptography by Bruce Schneier * Applied Cryptography by Bruce Schneier
* This code is hereby placed in the public domain * This code is hereby placed in the public domain
*/ */
#ifndef SHA1_H #ifndef SHA1_H

View File

@@ -178,15 +178,15 @@ put_unaligned_u64(uint64_t *p, uint64_t x)
static inline uint64_t static inline uint64_t
get_32aligned_u64(const ovs_32aligned_u64 *x) 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'. */ /* Stores 'value' in 'x'. */
static inline void static inline void
put_32aligned_u64(ovs_32aligned_u64 *x, uint64_t value) put_32aligned_u64(ovs_32aligned_u64 *x, uint64_t value)
{ {
x->hi = value >> 32; x->hi = value >> 32;
x->lo = value; x->lo = value;
} }
#ifndef __CHECKER__ #ifndef __CHECKER__
@@ -195,9 +195,9 @@ static inline ovs_be64
get_32aligned_be64(const ovs_32aligned_be64 *x) get_32aligned_be64(const ovs_32aligned_be64 *x)
{ {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
return ((ovs_be64) x->hi << 32) | x->lo; return ((ovs_be64) x->hi << 32) | x->lo;
#else #else
return ((ovs_be64) x->lo << 32) | x->hi; return ((ovs_be64) x->lo << 32) | x->hi;
#endif #endif
} }
@@ -206,8 +206,8 @@ static inline void
put_32aligned_be64(ovs_32aligned_be64 *x, ovs_be64 value) put_32aligned_be64(ovs_32aligned_be64 *x, ovs_be64 value)
{ {
#if WORDS_BIGENDIAN #if WORDS_BIGENDIAN
x->hi = value >> 32; x->hi = value >> 32;
x->lo = value; x->lo = value;
#else #else
x->hi = value; x->hi = value;
x->lo = value >> 32; x->lo = value >> 32;

View File

@@ -1943,7 +1943,7 @@ handle_set_config(struct ofconn *ofconn, const struct ofp_switch_config *osc)
} }
} }
ofconn_set_invalid_ttl_to_controller(ofconn, 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)); ofconn_set_miss_send_len(ofconn, ntohs(osc->miss_send_len));

View File

@@ -185,8 +185,8 @@ int ofproto_port_dump_done(struct ofproto_port_dump *);
: (ofproto_port_dump_done(DUMP), false)); \ : (ofproto_port_dump_done(DUMP), false)); \
) )
#define OFPROTO_FLOW_EVICTON_THRESHOLD_DEFAULT 1000 #define OFPROTO_FLOW_EVICTON_THRESHOLD_DEFAULT 1000
#define OFPROTO_FLOW_EVICTION_THRESHOLD_MIN 100 #define OFPROTO_FLOW_EVICTION_THRESHOLD_MIN 100
int ofproto_port_add(struct ofproto *, struct netdev *, uint16_t *ofp_portp); int ofproto_port_add(struct ofproto *, struct netdev *, uint16_t *ofp_portp);
int ofproto_port_del(struct ofproto *, uint16_t ofp_port); int ofproto_port_del(struct ofproto *, uint16_t ofp_port);