Skip to content

Commit c4b655a

Browse files
committed
Rename success variables to ret
1 parent 3dfa5cb commit c4b655a

File tree

10 files changed

+55
-61
lines changed

10 files changed

+55
-61
lines changed

menu/cbs/menu_cbs_ok.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3987,15 +3987,15 @@ static int action_ok_remap_file_flush(const char *path,
39873987
runloop_state_t *runloop_st = runloop_state_get_ptr();
39883988
const char *path_remapfile = runloop_st->name.remapfile;
39893989
const char *remapfile = NULL;
3990-
bool success = false;
3990+
bool ret = false;
39913991

39923992
msg[0] = '\0';
39933993

39943994
/* Check if a remap file is active */
39953995
if (!string_is_empty(path_remapfile))
39963996
{
39973997
/* Update existing remap file */
3998-
success = input_remapping_save_file(path_remapfile);
3998+
ret = input_remapping_save_file(path_remapfile);
39993999
/* Get remap file name for display purposes */
40004000
remapfile = path_basename_nocompression(path_remapfile);
40014001
}
@@ -4004,7 +4004,7 @@ static int action_ok_remap_file_flush(const char *path,
40044004
remapfile = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN);
40054005

40064006
/* Log result */
4007-
if (success)
4007+
if (ret)
40084008
{
40094009
/* TODO/FIXME - localize */
40104010
RARCH_LOG(
@@ -4027,7 +4027,7 @@ static int action_ok_remap_file_flush(const char *path,
40274027

40284028
runloop_msg_queue_push(msg, _len, 1, 100, true, NULL,
40294029
MESSAGE_QUEUE_ICON_DEFAULT,
4030-
(success) ? MESSAGE_QUEUE_CATEGORY_SUCCESS : MESSAGE_QUEUE_CATEGORY_ERROR);
4030+
ret ? MESSAGE_QUEUE_CATEGORY_SUCCESS : MESSAGE_QUEUE_CATEGORY_ERROR);
40314031

40324032
return 0;
40334033
}
@@ -5001,22 +5001,22 @@ static int action_ok_core_updater_list(const char *path,
50015001
* interface */
50025002
struct string_list *available_cores =
50035003
play_feature_delivery_available_cores();
5004-
bool success = false;
5004+
bool ret = false;
50055005

50065006
if (!available_cores)
50075007
return -1;
50085008

50095009
core_updater_list_reset(core_list);
50105010

5011-
success = core_updater_list_parse_pfd_data(
5011+
ret = core_updater_list_parse_pfd_data(
50125012
core_list,
50135013
path_dir_libretro,
50145014
path_libretro_info,
50155015
available_cores);
50165016

50175017
string_list_free(available_cores);
50185018

5019-
if (!success)
5019+
if (!ret)
50205020
return -1;
50215021

50225022
/* Ensure network is initialised */

menu/drivers/rgui.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ static void rgui_load_custom_theme(
30983098
unsigned particle_color = 0;
30993099
config_file_t *conf = NULL;
31003100
const char *wallpaper_key = NULL;
3101-
bool success = false;
3101+
bool ret = false;
31023102
#if defined(DINGUX)
31033103
menu_rgui_aspect_ratio = RGUI_DINGUX_ASPECT_RATIO;
31043104
#endif
@@ -3178,11 +3178,11 @@ static void rgui_load_custom_theme(
31783178
particle_color = (normal_color & 0x00FFFFFF) |
31793179
(bg_light_color & 0xFF000000);
31803180

3181-
success = true;
3181+
ret = true;
31823182

31833183
end:
31843184

3185-
if (success)
3185+
if (ret)
31863186
{
31873187
theme_colors->normal_color = (uint32_t)normal_color;
31883188
theme_colors->hover_color = (uint32_t)hover_color;

menu/drivers/xmb.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4213,7 +4213,7 @@ static bool xmb_animation_line_ticker(gfx_animation_t *p_anim, gfx_animation_ctx
42134213
size_t line_ticker_str_len = 0;
42144214
struct string_list lines = {0};
42154215
size_t line_offset = 0;
4216-
bool success = false;
4216+
bool ret = false;
42174217
bool is_active = false;
42184218

42194219
/* Sanity check */
@@ -4253,7 +4253,7 @@ static bool xmb_animation_line_ticker(gfx_animation_t *p_anim, gfx_animation_ctx
42534253
if (lines.size <= line_ticker->max_lines)
42544254
{
42554255
strlcpy(line_ticker->s, wrapped_str, line_ticker->len);
4256-
success = true;
4256+
ret = true;
42574257
goto end;
42584258
}
42594259

@@ -4282,7 +4282,7 @@ static bool xmb_animation_line_ticker(gfx_animation_t *p_anim, gfx_animation_ctx
42824282
line_ticker->max_lines, line_offset, &lines, lines.size,
42834283
line_ticker->s, line_ticker->len);
42844284

4285-
success = true;
4285+
ret = true;
42864286
is_active = true;
42874287
p_anim->flags |= GFX_ANIM_FLAG_TICKER_IS_ACTIVE;
42884288

@@ -4295,7 +4295,7 @@ static bool xmb_animation_line_ticker(gfx_animation_t *p_anim, gfx_animation_ctx
42954295
}
42964296

42974297
string_list_deinitialize(&lines);
4298-
if (!success)
4298+
if (!ret)
42994299
if (line_ticker->len > 0)
43004300
line_ticker->s[0] = '\0';
43014301

@@ -4513,7 +4513,7 @@ static bool xmb_animation_line_ticker_smooth(gfx_animation_t *p_anim, gfx_animat
45134513
size_t top_fade_line_offset = 0;
45144514
size_t bottom_fade_line_offset = 0;
45154515
bool fade_active = false;
4516-
bool success = false;
4516+
bool ret = false;
45174517
bool is_active = false;
45184518
int wideglyph_width = 100;
45194519
size_t (*word_wrap_func)(char *dst, size_t dst_size,
@@ -4615,7 +4615,7 @@ static bool xmb_animation_line_ticker_smooth(gfx_animation_t *p_anim, gfx_animat
46154615
*line_ticker->bottom_fade_alpha = 0.0f;
46164616
}
46174617

4618-
success = true;
4618+
ret = true;
46194619
goto end;
46204620
}
46214621

@@ -4671,7 +4671,7 @@ static bool xmb_animation_line_ticker_smooth(gfx_animation_t *p_anim, gfx_animat
46714671
line_ticker->bottom_fade_str_len);
46724672
}
46734673

4674-
success = true;
4674+
ret = true;
46754675
is_active = true;
46764676
p_anim->flags |= GFX_ANIM_FLAG_TICKER_IS_ACTIVE;
46774677

@@ -4685,7 +4685,7 @@ static bool xmb_animation_line_ticker_smooth(gfx_animation_t *p_anim, gfx_animat
46854685

46864686
string_list_deinitialize(&lines);
46874687

4688-
if (!success)
4688+
if (!ret)
46894689
{
46904690
if (line_ticker->dst_str_len > 0)
46914691
line_ticker->dst_str[0] = '\0';

play_feature_delivery/play_feature_delivery.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -491,15 +491,15 @@ bool play_feature_delivery_download(const char *core_file)
491491
play_feature_delivery_state_t* state = play_feature_delivery_get_state();
492492
JNIEnv *env = jni_thread_getenv();
493493
struct android_app *app = (struct android_app*)g_android;
494-
bool success = false;
494+
bool ret = false;
495495
char core_name[256];
496496
jstring core_name_jni;
497497

498498
core_name[0] = '\0';
499499

500-
if (!env ||
501-
!app ||
502-
!app->downloadCore)
500+
if ( !env
501+
|| !app
502+
|| !app->downloadCore)
503503
return false;
504504

505505
/* Extract core name */
@@ -532,15 +532,15 @@ bool play_feature_delivery_download(const char *core_file)
532532
/* Free core_name_jni reference */
533533
(*env)->DeleteLocalRef(env, core_name_jni);
534534

535-
success = true;
535+
ret = true;
536536
}
537537

538538
/* Unlock mutex */
539539
#ifdef HAVE_THREADS
540540
slock_unlock(state->status_lock);
541541
#endif
542542

543-
return success;
543+
return ret;
544544
}
545545

546546
/* Deletes specified core.
@@ -554,9 +554,9 @@ bool play_feature_delivery_delete(const char *core_file)
554554

555555
core_name[0] = '\0';
556556

557-
if (!env ||
558-
!app ||
559-
!app->deleteCore)
557+
if ( !env
558+
|| !app
559+
|| !app->deleteCore)
560560
return false;
561561

562562
/* Extract core name */

runloop.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,7 +5301,7 @@ void core_options_flush(void)
53015301
core_option_manager_t *coreopts = runloop_st->core_options;
53025302
const char *path_core_options = path_get(RARCH_PATH_CORE_OPTIONS);
53035303
const char *core_options_file = NULL;
5304-
bool success = false;
5304+
bool ret = false;
53055305

53065306
msg[0] = '\0';
53075307

@@ -5329,7 +5329,7 @@ void core_options_flush(void)
53295329
{
53305330
core_option_manager_flush(runloop_st->core_options, conf_tmp);
53315331

5332-
success = config_file_write(conf_tmp, path_core_options, true);
5332+
ret = config_file_write(conf_tmp, path_core_options, true);
53335333
config_file_free(conf_tmp);
53345334
}
53355335
}
@@ -5353,7 +5353,7 @@ void core_options_flush(void)
53535353
if (!path_is_valid(path_core_options))
53545354
runloop_st->core_options->conf->flags |= CONF_FILE_FLG_MODIFIED;
53555355

5356-
success = config_file_write(runloop_st->core_options->conf,
5356+
ret = config_file_write(runloop_st->core_options->conf,
53575357
path_core_options, true);
53585358
}
53595359
}
@@ -5365,7 +5365,7 @@ void core_options_flush(void)
53655365
if (string_is_empty(core_options_file))
53665366
core_options_file = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN);
53675367

5368-
if (success)
5368+
if (ret)
53695369
{
53705370
/* Log result */
53715371
_len = strlcpy(msg, msg_hash_to_str(MSG_CORE_OPTIONS_FLUSHED),

save.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ bool event_save_files(bool is_sram_used, bool compress_files,
512512
bool event_load_save_files(bool is_sram_load_disabled)
513513
{
514514
unsigned i;
515-
bool success = false;
515+
bool ret = false;
516516

517517
if (!task_save_files || is_sram_load_disabled)
518518
return false;
@@ -521,9 +521,9 @@ bool event_load_save_files(bool is_sram_load_disabled)
521521
* any type of RAM file is found and
522522
* processed correctly */
523523
for (i = 0; i < task_save_files->size; i++)
524-
success |= content_load_ram_file(i);
524+
ret |= content_load_ram_file(i);
525525

526-
return success;
526+
return ret;
527527
}
528528

529529
void path_init_savefile_rtc(const char *savefile_path)

tasks/task_autodetect_blissbox.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3
161161
SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
162162
HANDLE hDeviceHandle = INVALID_HANDLE_VALUE;
163163
BOOL bResult = TRUE;
164-
BOOL success = FALSE;
164+
BOOL ret = FALSE;
165165
GUID guidDeviceInterface = {0};
166166
PSP_DEVICE_INTERFACE_DETAIL_DATA
167167
pInterfaceDetailData = NULL;
@@ -200,9 +200,9 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3
200200
/* Enumerate all the device interfaces in the device information set. */
201201
device_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
202202

203-
while (!success)
203+
while (!ret)
204204
{
205-
success = SetupDiEnumDeviceInfo(hDeviceInfo, index, &device_info_data);
205+
ret = SetupDiEnumDeviceInfo(hDeviceInfo, index, &device_info_data);
206206

207207
/* Reset for this iteration */
208208
if (lp_device_path)
@@ -314,7 +314,7 @@ static const blissbox_pad_type_t* input_autoconfigure_get_blissbox_pad_type_win3
314314
goto found;
315315
}
316316

317-
success = FALSE;
317+
ret = FALSE;
318318
index++;
319319
}
320320

tasks/task_content.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ static bool content_load(content_ctx_info_t *info,
13971397
content_state_t *p_content)
13981398
{
13991399
size_t i;
1400-
bool success = false;
1400+
bool ret = false;
14011401
int rarch_argc = 0;
14021402
char *rarch_argv[MAX_ARGS] = {NULL};
14031403
char *argv_copy [MAX_ARGS] = {NULL};
@@ -1439,13 +1439,13 @@ static bool content_load(content_ctx_info_t *info,
14391439
wrap_args->argc = *rarch_argc_ptr;
14401440
wrap_args->argv = rarch_argv_ptr;
14411441

1442-
success = retroarch_main_init(wrap_args->argc, wrap_args->argv);
1442+
ret = retroarch_main_init(wrap_args->argc, wrap_args->argv);
14431443

14441444
for (i = 0; i < ARRAY_SIZE(argv_copy); i++)
14451445
free(argv_copy[i]);
14461446
free(wrap_args);
14471447

1448-
if (!success)
1448+
if (!ret)
14491449
return false;
14501450

14511451
if (p_content->flags & CONTENT_ST_FLAG_PENDING_SUBSYSTEM_INIT)

tasks/task_core_updater.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ static uint32_t task_core_updater_get_core_crc(const char *core_path)
194194
{
195195
uint32_t crc = 0;
196196
/* Get CRC value */
197-
bool success = intfstream_get_crc(core_file, &crc);
197+
bool ret = intfstream_get_crc(core_file, &crc);
198198

199199
/* Close core file */
200200
intfstream_close(core_file);
201201
free(core_file);
202202
core_file = NULL;
203203

204-
if (success)
204+
if (ret)
205205
return crc;
206206
}
207207

@@ -216,9 +216,9 @@ static void cb_http_task_core_updater_get_list(
216216
retro_task_t *task, void *task_data,
217217
void *user_data, const char *err)
218218
{
219-
file_transfer_t *transf = (file_transfer_t*)user_data;
220-
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
221-
bool success = data && string_is_empty(err);
219+
file_transfer_t *transf = (file_transfer_t*)user_data;
220+
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
221+
bool ret = data && string_is_empty(err);
222222

223223
if (transf)
224224
{
@@ -229,12 +229,12 @@ static void cb_http_task_core_updater_get_list(
229229

230230
list_handle->http_data = data;
231231
list_handle->http_task_complete = true;
232-
list_handle->http_task_success = success;
232+
list_handle->http_task_success = ret;
233233
}
234234
}
235235

236236
/* Log any error messages */
237-
if (!success)
237+
if (!ret)
238238
RARCH_ERR("[Core Updater] Download of core list \"%s\" failed: %s.\n",
239239
(transf ? transf->path: "unknown"),
240240
(err ? err : "unknown"));
@@ -1947,7 +1947,7 @@ static void task_play_feature_delivery_switch_cores_handler(
19471947
* core list' error */
19481948
struct string_list *available_cores =
19491949
play_feature_delivery_available_cores();
1950-
bool success = false;
1950+
bool ret = false;
19511951

19521952
if (!available_cores)
19531953
{
@@ -1957,7 +1957,7 @@ static void task_play_feature_delivery_switch_cores_handler(
19571957
}
19581958

19591959
/* Populate core updater list */
1960-
success = core_updater_list_parse_pfd_data(
1960+
ret = core_updater_list_parse_pfd_data(
19611961
pfd_switch_cores_handle->core_list,
19621962
pfd_switch_cores_handle->path_dir_libretro,
19631963
pfd_switch_cores_handle->path_libretro_info,
@@ -1966,7 +1966,7 @@ static void task_play_feature_delivery_switch_cores_handler(
19661966
string_list_free(available_cores);
19671967

19681968
/* Cache list size */
1969-
if (success)
1969+
if (ret)
19701970
pfd_switch_cores_handle->list_size =
19711971
core_updater_list_size(pfd_switch_cores_handle->core_list);
19721972

0 commit comments

Comments
 (0)