Changeset c81132d in mainline


Ignore:
Timestamp:
2017-12-09T21:25:14Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1afa94d
Parents:
94e3a03
Message:

Replace casts from non-bool to bool with explicit equality check.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/smp/mps.c

    r94e3a03 rc81132d  
    9191                return false;
    9292       
    93         return (bool) ((processor_entries[i].cpu_flags & 0x01) == 0x01);
     93        return ((processor_entries[i].cpu_flags & 0x01) == 0x01);
    9494}
    9595
     
    9898        assert(i < processor_entry_cnt);
    9999       
    100         return (bool) ((processor_entries[i].cpu_flags & 0x02) == 0x02);
     100        return ((processor_entries[i].cpu_flags & 0x02) == 0x02);
    101101}
    102102
  • kernel/generic/src/mm/as.c

    r94e3a03 rc81132d  
    833833                            btree_node_t, leaf_link);
    834834                       
    835                         if ((cond = (bool) node->keys)) {
     835                        if ((cond = (node->keys != 0))) {
    836836                                uintptr_t ptr = node->key[node->keys - 1];
    837837                                size_t node_size =
  • uspace/drv/bus/pci/pciintel/pci.c

    r94e3a03 rc81132d  
    514514#define MEM_MASK (~0xf)
    515515       
    516         io = (bool) (val & 1);
     516        io = (val & 1) != 0;
    517517        if (io) {
    518518                addrw64 = false;
  • uspace/lib/c/arch/arm32/include/libarch/atomic.h

    r94e3a03 rc81132d  
    8282        ras_page[1] = 0xffffffff;
    8383       
    84         return (bool) ret;
     84        return ret != 0;
    8585}
    8686
  • uspace/lib/hound/src/protocol.c

    r94e3a03 rc81132d  
    189189        ipc_call_t res_call;
    190190        aid_t mid = async_send_3(exch, IPC_M_HOUND_GET_LIST, flags, *count,
    191             (bool)connection, &res_call);
     191            connection != NULL, &res_call);
    192192
    193193        sysarg_t ret = EOK;
  • uspace/srv/audio/hound/audio_device.c

    r94e3a03 rc81132d  
    6262        assert(dev);
    6363        /* we release buffer on stop so this should be enough */
    64         return (bool)dev->buffer.base;
     64        return dev->buffer.base != NULL;
    6565}
    6666
Note: See TracChangeset for help on using the changeset viewer.