@matheusbsbs / matheus-bagliano / commits / 987460611a
Fork 0

Standardize do { ... } while (0) style

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Aug 12, 2010 at 17:11 UTC 987460611ab08ebac83ead9a5ee316d3b3823e7f
4 files changed +10 -10
base85.c
+3 -3
@@ -7,9 +7,9 @@
7 #define say1(a,b) fprintf(stderr, a, b)
8 #define say2(a,b,c) fprintf(stderr, a, b, c)
9 #else
10 -#define say(a) do {} while(0)
11 -#define say1(a,b) do {} while(0)
12 -#define say2(a,b,c) do {} while(0)
10 +#define say(a) do { /* nothing */ } while (0)
11 +#define say1(a,b) do { /* nothing */ } while (0)
12 +#define say2(a,b,c) do { /* nothing */ } while (0)
13 #endif
14
15 static const char en85[] = {
cache.h
+1 -1
@@ -449,7 +449,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
449 alloc = alloc_nr(alloc); \
450 x = xrealloc((x), alloc * sizeof(*(x))); \
451 } \
452 - } while(0)
452 + } while (0)
453
454 /* Initialize and use the cache information */
455 extern int read_index(struct index_state *);
diffcore.h
+4 -4
@@ -98,7 +98,7 @@ struct diff_queue_struct {
98 (q)->queue = NULL; \
99 (q)->nr = (q)->alloc = 0; \
100 (q)->run = 0; \
101 - } while(0);
101 + } while (0)
102
103 extern struct diff_queue_struct diff_queued_diff;
104 extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
@@ -118,9 +118,9 @@ void diff_debug_filespec(struct diff_filespec *, int, const char *);
118 void diff_debug_filepair(const struct diff_filepair *, int);
119 void diff_debug_queue(const char *, struct diff_queue_struct *);
120 #else
121 -#define diff_debug_filespec(a,b,c) do {} while(0)
122 -#define diff_debug_filepair(a,b) do {} while(0)
123 -#define diff_debug_queue(a,b) do {} while(0)
121 +#define diff_debug_filespec(a,b,c) do { /* nothing */ } while (0)
122 +#define diff_debug_filepair(a,b) do { /* nothing */ } while (0)
123 +#define diff_debug_queue(a,b) do { /* nothing */ } while (0)
124 #endif
125
126 extern int diffcore_count_changes(struct diff_filespec *src,
http.h
+2 -2
@@ -23,10 +23,10 @@
23 #endif
24
25 #if LIBCURL_VERSION_NUM < 0x070704
26 -#define curl_global_cleanup() do { /* nothing */ } while(0)
26 +#define curl_global_cleanup() do { /* nothing */ } while (0)
27 #endif
28 #if LIBCURL_VERSION_NUM < 0x070800
29 -#define curl_global_init(a) do { /* nothing */ } while(0)
29 +#define curl_global_init(a) do { /* nothing */ } while (0)
30 #endif
31
32 #if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)