summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-05-21 14:15:24 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-05-21 14:15:24 +0000
commitab222c170562ba2f89827c2e3185ae359eface76 (patch)
tree3dfcdf8a5b7a267b153c72533a894d4aaa47fe8e /apps/settings.c
parenta968ddbb39e246e6eec744fff4b7650dfa8e2791 (diff)
Simplify some redundant boolean expressions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c
index a782ac5548..0457f879c6 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -315,9 +315,9 @@ bool settings_load_config(const char* file, bool apply)
{
int temp;
if (cfg_string_to_int(i,&temp,value))
- *(bool*)settings[i].setting = (temp==0?false:true);
+ *(bool*)settings[i].setting = (temp!=0);
if (settings[i].bool_setting->option_callback)
- settings[i].bool_setting->option_callback(temp==0?false:true);
+ settings[i].bool_setting->option_callback(temp!=0);
break;
}
case F_T_CHARPTR:
@@ -1132,7 +1132,7 @@ bool set_option(const char* string, const void* variable, enum optiontype type,
if (!option_screen(&item, NULL, false, NULL))
{
if (type == BOOL)
- *(bool*)variable = (temp == 1? true: false);
+ *(bool*)variable = (temp == 1);
else
*(int*)variable = temp;
return false;