Style nits

This commit is contained in:
twinaphex 2015-03-22 07:37:25 +01:00
parent 9128319182
commit d3b964a1c2
3 changed files with 21 additions and 22 deletions

View file

@ -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. */

View file

@ -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;

View file

@ -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();