Simplify some boolean expressions that compare directly against 'true'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24144 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2010-01-02 16:03:30 +00:00
parent d03768bc14
commit 799a0a5cd4
7 changed files with 9 additions and 9 deletions

View File

@ -701,7 +701,7 @@ static void update_total(struct game_context* bj) {
static signed int check_for_aces(struct card temp_cards[], unsigned int size) {
unsigned int i;
for(i = 0; i < size; i++) {
if (temp_cards[i].is_soft_ace == true)
if (temp_cards[i].is_soft_ace)
return i;
}
return -1;

View File

@ -70,7 +70,7 @@ void traversedir(char* location, char* name)
if (dir) {
entry = rb->readdir(dir);
while (entry) {
if (abort == true)
if (abort)
break;
/* Skip .. and . */
if (entry->d_name[0] == '.')

View File

@ -389,7 +389,7 @@ int plugin_main(void)
((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)))
/* This will make the stars pulse to the music */
if(pulse==true){
if(pulse){
/* Get the peaks. ( Borrowed from vu_meter ) */
#if (CONFIG_CODEC == SWCODEC)

View File

@ -164,7 +164,7 @@ void traversedir(char* location, char* name)
if (dir) {
entry = rb->readdir(dir);
while (entry) {
if (abort == true)
if (abort)
break;
/* Skip .. and . */
if (rb->strcmp(entry->d_name, ".") && rb->strcmp(entry->d_name, ".."))
@ -227,7 +227,7 @@ enum plugin_status plugin_start(const void* parameter)
lasttick = *rb->current_tick;
traversedir("", "");
if (abort == true) {
if (abort) {
rb->splash(HZ, "Aborted");
return PLUGIN_OK;
}

View File

@ -416,7 +416,7 @@ void SERIAL0(void)
}
}
bool pkt = iap_getc(temp);
if(newpkt == true && pkt == false)
if(newpkt && !pkt)
autobaud = 0; /* Found good baud */
newpkt = pkt;
}

View File

@ -300,7 +300,7 @@ int ipod_rmt_tuner_set(int setting, int value)
case RADIO_FREQUENCY:
{
rmt_tuner_set_freq(value);
if (reply_timeout() == true)
if (reply_timeout())
return 0;
break;
}
@ -326,7 +326,7 @@ int ipod_rmt_tuner_set(int setting, int value)
else
rmt_tuner_scan(1);
if (reply_timeout() == true)
if (reply_timeout())
return 0;
radio_tuned = 0;
}

View File

@ -356,7 +356,7 @@ void usb_storage_try_release_storage(void)
bool canrelease=true;
int i;
for(i=0;i<storage_num_drives();i++) {
if(ejected[i]==false && locked[i]==true) {
if(!ejected[i] && locked[i]) {
canrelease=false;
break;
}