From d3b964a1c2298db4cc9e7f316200b4b94cca6a5b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Mar 2015 07:37:25 +0100 Subject: [PATCH] Style nits --- content.c | 31 +++++++++++++++---------------- file_ops.c | 2 +- libretro_version_1.c | 10 +++++----- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/content.c b/content.c index 5a8b010202..d90e71ecc8 100644 --- a/content.c +++ b/content.c @@ -183,12 +183,12 @@ bool load_state(const char *path) { unsigned i; ssize_t size; - unsigned num_blocks = 0; - void *buf = NULL; + unsigned num_blocks = 0; + void *buf = NULL; struct sram_block *blocks = NULL; - settings_t *settings = config_get_ptr(); - global_t *global = global_get_ptr(); - bool ret = read_file(path, &buf, &size); + settings_t *settings = config_get_ptr(); + global_t *global = global_get_ptr(); + bool ret = read_file(path, &buf, &size); RARCH_LOG("Loading state: \"%s\".\n", path); @@ -263,7 +263,7 @@ bool load_state(const char *path) void load_ram_file(const char *path, int type) { ssize_t rc; - bool ret = false; + bool ret = false; void *buf = NULL; size_t size = pretro_get_memory_size(type); void *data = pretro_get_memory_data(type); @@ -352,7 +352,7 @@ static bool load_content_need_fullpath( char new_path[PATH_MAX_LENGTH], new_basedir[PATH_MAX_LENGTH]; ssize_t len; union string_list_elem_attr attributes; - bool ret = false; + bool ret = false; settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); @@ -437,9 +437,8 @@ static bool load_content(const struct retro_subsystem_info *special, for (i = 0; i < content->size; i++) { - const char *path = content->elems[i].data; - int attr = content->elems[i].attr.i; - + const char *path = content->elems[i].data; + int attr = content->elems[i].attr.i; bool need_fullpath = attr & 2; bool require_content = attr & 4; @@ -504,13 +503,13 @@ bool init_content_file(void) { unsigned i; union string_list_elem_attr attr; - bool ret = false; - struct string_list *content = NULL; + bool ret = false; + struct string_list *content = NULL; const struct retro_subsystem_info *special = NULL; - settings_t *settings = config_get_ptr(); - global_t *global = global_get_ptr(); + settings_t *settings = config_get_ptr(); + global_t *global = global_get_ptr(); - global->temporary_content = string_list_new(); + global->temporary_content = string_list_new(); if (!global->temporary_content) goto error; @@ -582,7 +581,7 @@ bool init_content_file(void) /* Try to extract all content we're going to load if appropriate. */ for (i = 0; i < content->size; i++) { - const char *ext = NULL; + const char *ext = NULL; const char *valid_ext = NULL; /* Block extract check. */ diff --git a/file_ops.c b/file_ops.c index d608c66c76..5cd31e952e 100644 --- a/file_ops.c +++ b/file_ops.c @@ -65,7 +65,7 @@ */ bool write_file(const char *path, const void *data, ssize_t size) { - bool ret = false; + bool ret = false; FILE *file = fopen(path, "wb"); if (!file) return false; diff --git a/libretro_version_1.c b/libretro_version_1.c index a6cbfa692f..942b7aa3be 100644 --- a/libretro_version_1.c +++ b/libretro_version_1.c @@ -118,7 +118,7 @@ static void video_frame(const void *data, unsigned width, unsigned height, size_t pitch) { unsigned output_width = 0, output_height = 0, output_pitch = 0; - const char *msg = NULL; + const char *msg = NULL; runloop_t *runloop = rarch_main_get_ptr(); driver_t *driver = driver_get_ptr(); global_t *global = global_get_ptr(); @@ -347,7 +347,7 @@ static void audio_sample_rewind(int16_t left, int16_t right) static size_t audio_sample_batch_rewind(const int16_t *data, size_t frames) { size_t i; - size_t samples = frames << 1; + size_t samples = frames << 1; global_t *global = global_get_ptr(); for (i = 0; i < samples; i++) @@ -404,7 +404,7 @@ static bool input_apply_turbo(unsigned port, unsigned id, bool res) static int16_t input_state(unsigned port, unsigned device, unsigned idx, unsigned id) { - int16_t res = 0; + int16_t res = 0; settings_t *settings = config_get_ptr(); driver_t *driver = driver_get_ptr(); global_t *global = global_get_ptr(); @@ -510,8 +510,8 @@ static INLINE void input_poll_overlay(input_overlay_t *overlay_device, float opa { input_overlay_state_t old_key_state; unsigned i, j, device; - uint16_t key_mod = 0; - bool polled = false; + uint16_t key_mod = 0; + bool polled = false; driver_t *driver = driver_get_ptr(); settings_t *settings = config_get_ptr();