mirror of
https://github.com/git/git.git
synced 2025-01-19 14:04:07 +08:00
Standardize do { ... } while (0) style
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0d1d6e50cf
commit
987460611a
6
base85.c
6
base85.c
@ -7,9 +7,9 @@
|
|||||||
#define say1(a,b) fprintf(stderr, a, b)
|
#define say1(a,b) fprintf(stderr, a, b)
|
||||||
#define say2(a,b,c) fprintf(stderr, a, b, c)
|
#define say2(a,b,c) fprintf(stderr, a, b, c)
|
||||||
#else
|
#else
|
||||||
#define say(a) do {} while(0)
|
#define say(a) do { /* nothing */ } while (0)
|
||||||
#define say1(a,b) do {} while(0)
|
#define say1(a,b) do { /* nothing */ } while (0)
|
||||||
#define say2(a,b,c) do {} while(0)
|
#define say2(a,b,c) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char en85[] = {
|
static const char en85[] = {
|
||||||
|
2
cache.h
2
cache.h
@ -449,7 +449,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
|
|||||||
alloc = alloc_nr(alloc); \
|
alloc = alloc_nr(alloc); \
|
||||||
x = xrealloc((x), alloc * sizeof(*(x))); \
|
x = xrealloc((x), alloc * sizeof(*(x))); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
/* Initialize and use the cache information */
|
/* Initialize and use the cache information */
|
||||||
extern int read_index(struct index_state *);
|
extern int read_index(struct index_state *);
|
||||||
|
@ -98,7 +98,7 @@ struct diff_queue_struct {
|
|||||||
(q)->queue = NULL; \
|
(q)->queue = NULL; \
|
||||||
(q)->nr = (q)->alloc = 0; \
|
(q)->nr = (q)->alloc = 0; \
|
||||||
(q)->run = 0; \
|
(q)->run = 0; \
|
||||||
} while(0);
|
} while (0)
|
||||||
|
|
||||||
extern struct diff_queue_struct diff_queued_diff;
|
extern struct diff_queue_struct diff_queued_diff;
|
||||||
extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
|
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_filepair(const struct diff_filepair *, int);
|
||||||
void diff_debug_queue(const char *, struct diff_queue_struct *);
|
void diff_debug_queue(const char *, struct diff_queue_struct *);
|
||||||
#else
|
#else
|
||||||
#define diff_debug_filespec(a,b,c) do {} while(0)
|
#define diff_debug_filespec(a,b,c) do { /* nothing */ } while (0)
|
||||||
#define diff_debug_filepair(a,b) do {} while(0)
|
#define diff_debug_filepair(a,b) do { /* nothing */ } while (0)
|
||||||
#define diff_debug_queue(a,b) do {} while(0)
|
#define diff_debug_queue(a,b) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int diffcore_count_changes(struct diff_filespec *src,
|
extern int diffcore_count_changes(struct diff_filespec *src,
|
||||||
|
4
http.h
4
http.h
@ -23,10 +23,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LIBCURL_VERSION_NUM < 0x070704
|
#if LIBCURL_VERSION_NUM < 0x070704
|
||||||
#define curl_global_cleanup() do { /* nothing */ } while(0)
|
#define curl_global_cleanup() do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
#if LIBCURL_VERSION_NUM < 0x070800
|
#if LIBCURL_VERSION_NUM < 0x070800
|
||||||
#define curl_global_init(a) do { /* nothing */ } while(0)
|
#define curl_global_init(a) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)
|
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)
|
||||||
|
Loading…
Reference in New Issue
Block a user