summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-12 17:11:15 -0500
committerJunio C Hamano <gitster@pobox.com>2010-08-12 15:44:51 -0700
commit987460611ab08ebac83ead9a5ee316d3b3823e7f (patch)
treebe489213bae1efc32ec9e82e0f22ce55a98065a7
parent0d1d6e50cf3401874b50b77aa1dc0e33357a1556 (diff)
downloadgit-987460611ab08ebac83ead9a5ee316d3b3823e7f.tar.gz
Standardize do { ... } while (0) style
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--base85.c6
-rw-r--r--cache.h2
-rw-r--r--diffcore.h8
-rw-r--r--http.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/base85.c b/base85.c
index e459feebbf..781b5754f0 100644
--- a/base85.c
+++ b/base85.c
@@ -7,9 +7,9 @@
#define say1(a,b) fprintf(stderr, a, b)
#define say2(a,b,c) fprintf(stderr, a, b, c)
#else
-#define say(a) do {} while(0)
-#define say1(a,b) do {} while(0)
-#define say2(a,b,c) do {} while(0)
+#define say(a) do { /* nothing */ } while (0)
+#define say1(a,b) do { /* nothing */ } while (0)
+#define say2(a,b,c) do { /* nothing */ } while (0)
#endif
static const char en85[] = {
diff --git a/cache.h b/cache.h
index c9fa3df7f5..1e690d1240 100644
--- a/cache.h
+++ b/cache.h
@@ -449,7 +449,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
alloc = alloc_nr(alloc); \
x = xrealloc((x), alloc * sizeof(*(x))); \
} \
- } while(0)
+ } while (0)
/* Initialize and use the cache information */
extern int read_index(struct index_state *);
diff --git a/diffcore.h b/diffcore.h
index fed9b151b5..05ebc115a1 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -98,7 +98,7 @@ struct diff_queue_struct {
(q)->queue = NULL; \
(q)->nr = (q)->alloc = 0; \
(q)->run = 0; \
- } while(0);
+ } while (0)
extern struct diff_queue_struct diff_queued_diff;
extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
@@ -118,9 +118,9 @@ void diff_debug_filespec(struct diff_filespec *, int, const char *);
void diff_debug_filepair(const struct diff_filepair *, int);
void diff_debug_queue(const char *, struct diff_queue_struct *);
#else
-#define diff_debug_filespec(a,b,c) do {} while(0)
-#define diff_debug_filepair(a,b) do {} while(0)
-#define diff_debug_queue(a,b) do {} while(0)
+#define diff_debug_filespec(a,b,c) do { /* nothing */ } while (0)
+#define diff_debug_filepair(a,b) do { /* nothing */ } while (0)
+#define diff_debug_queue(a,b) do { /* nothing */ } while (0)
#endif
extern int diffcore_count_changes(struct diff_filespec *src,
diff --git a/http.h b/http.h
index a0b5901594..173f74c829 100644
--- a/http.h
+++ b/http.h
@@ -23,10 +23,10 @@
#endif
#if LIBCURL_VERSION_NUM < 0x070704
-#define curl_global_cleanup() do { /* nothing */ } while(0)
+#define curl_global_cleanup() do { /* nothing */ } while (0)
#endif
#if LIBCURL_VERSION_NUM < 0x070800
-#define curl_global_init(a) do { /* nothing */ } while(0)
+#define curl_global_init(a) do { /* nothing */ } while (0)
#endif
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)