From f48247a18bb4453c8ceab3dccfd914db0f72ec47 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 15 Oct 2011 12:56:48 +0200 Subject: [PATCH] Style nits ... --- audio/openal.c | 2 +- dynamic.c | 6 +++--- file.c | 2 +- general.h | 6 +++--- movie.c | 2 +- ssnes.c | 2 +- tools/ssnes-joyconfig.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/audio/openal.c b/audio/openal.c index 2819f0e32f..b71652a930 100644 --- a/audio/openal.c +++ b/audio/openal.c @@ -133,7 +133,7 @@ static bool al_get_buffer(al_t *al, ALuint *buffer) }; #endif - for(;;) + for (;;) { if (al_unqueue_buffers(al)) break; diff --git a/dynamic.c b/dynamic.c index a143991de3..44a6887b90 100644 --- a/dynamic.c +++ b/dynamic.c @@ -39,11 +39,11 @@ #define SYM(type, x) do { \ p##x = (type)DLSYM(lib_handle, x); \ if (p##x == NULL) { SSNES_ERR("Failed to load symbol: \"%s\"\n", #x); exit(1); } \ -} while(0) +} while (0) #define OPT_SYM(type, x) do { \ p##x = (type)DLSYM(lib_handle, x); \ -} while(0) +} while (0) static dylib_t lib_handle = NULL; #endif @@ -144,7 +144,7 @@ static void load_dynamic(void) #define SSYM(x) do { \ p##x = x; \ -} while(0) +} while (0) #ifndef HAVE_DYNAMIC static void set_statics(void) diff --git a/file.c b/file.c index a9798f6a28..47abb6f397 100644 --- a/file.c +++ b/file.c @@ -251,7 +251,7 @@ static ssize_t read_rom_file(FILE* file, void** buf) return -1; } - for(;;) + for (;;) { size_t ret = fread(rom_buf + buf_ptr, 1, buf_size - buf_ptr, stdin); buf_ptr += ret; diff --git a/general.h b/general.h index 6a91739553..5073607f3c 100644 --- a/general.h +++ b/general.h @@ -300,17 +300,17 @@ extern struct global g_extern; if (g_extern.verbose) \ fprintf(stderr, "SSNES: " __VA_ARGS__); \ fflush(stderr); \ - } while(0) + } while (0) #define SSNES_ERR(...) do { \ fprintf(stderr, "SSNES [ERROR] :: " __VA_ARGS__); \ fflush(stderr); \ - } while(0) + } while (0) #define SSNES_WARN(...) do { \ fprintf(stderr, "SSNES [WARN] :: " __VA_ARGS__); \ fflush(stderr); \ - } while(0) + } while (0) static inline uint32_t next_pow2(uint32_t v) { diff --git a/movie.c b/movie.c index b587704a34..5e247fa8a3 100644 --- a/movie.c +++ b/movie.c @@ -78,7 +78,7 @@ uint32_t crc32_adjust(uint32_t crc32, uint8_t input) uint32_t crc32_calculate(const uint8_t *data, unsigned length) { uint32_t crc32 = ~0; - for(unsigned i = 0; i < length; i++) + for (unsigned i = 0; i < length; i++) crc32 = crc32_adjust(crc32, data[i]); return ~crc32; } diff --git a/ssnes.c b/ssnes.c index b6989b55aa..de135cba3b 100644 --- a/ssnes.c +++ b/ssnes.c @@ -546,7 +546,7 @@ static void parse_input(int argc, char *argv[]) #endif char optstring[] = "hs:fvS:m:p4jJg:b:B:Y:Z:P:HC:F:U:DN:X:" FFMPEG_RECORD_ARG CONFIG_FILE_ARG; - for(;;) + for (;;) { val = 0; int c = getopt_long(argc, argv, optstring, opts, &option_index); diff --git a/tools/ssnes-joyconfig.c b/tools/ssnes-joyconfig.c index de2ed75a51..1b6c1b98ee 100644 --- a/tools/ssnes-joyconfig.c +++ b/tools/ssnes-joyconfig.c @@ -235,7 +235,7 @@ static void parse_input(int argc, char *argv[]) }; int option_index = 0; - for(;;) + for (;;) { int c = getopt_long(argc, argv, optstring, opts, &option_index); if (c == -1)