diff --git a/src/add-ons/kernel/busses/mmc/sdhci_pci.cpp b/src/add-ons/kernel/busses/mmc/sdhci_pci.cpp index 2b3ffcb921..4cb933f5c7 100644 --- a/src/add-ons/kernel/busses/mmc/sdhci_pci.cpp +++ b/src/add-ons/kernel/busses/mmc/sdhci_pci.cpp @@ -614,7 +614,6 @@ supports_device(device_node* parent) if (strcmp(bus, "pci") != 0) return 0.0f; - } if (type == PCI_base_peripheral) { if (subType != PCI_sd_host) diff --git a/src/add-ons/kernel/busses/scsi/usb/proto_bulk.c b/src/add-ons/kernel/busses/scsi/usb/proto_bulk.c index c369152a29..27b15e8049 100644 --- a/src/add-ons/kernel/busses/scsi/usb/proto_bulk.c +++ b/src/add-ons/kernel/busses/scsi/usb/proto_bulk.c @@ -218,7 +218,7 @@ read_status(usb_device_info *udi, usb_mass_CSW* csw, int transfer_len) int try = 0; do{ status = queue_bulk(udi, csw, CSW_LENGTH, true); - if(0 == try){ + if(try == 0){ if(B_OK != status || B_OK != udi->status){ status = (*udi->usb_m->clear_feature)(udi->pipe_in, USB_FEATURE_ENDPOINT_HALT); if(status != 0){ diff --git a/src/add-ons/kernel/debugger/hangman/hangman.c b/src/add-ons/kernel/debugger/hangman/hangman.c index 8a0585fdd1..7578864efb 100644 --- a/src/add-ons/kernel/debugger/hangman/hangman.c +++ b/src/add-ons/kernel/debugger/hangman/hangman.c @@ -283,9 +283,8 @@ play_hangman(void) while (*str) { if (!(BIT_FROM_LETTER(*str) & tried_letters)) gotit=0; - if (*str == try) { + if (try == *str) gotone = 1; - } str++; } } diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp index 13985d3024..238dc0a4a9 100644 --- a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp +++ b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp @@ -124,8 +124,8 @@ spawn_device(usb_device usb_dev) } release_sem_etc(dev_table_sem, 1, B_DO_NOT_RESCHEDULE); - // In the case we cannot us - if (bt_usb_devices[i] != new_bt_dev) { + // In the case we cannot find a free slot + if (i >= MAX_BT_GENERIC_USB_DEVICES) { ERROR("%s: Device could not be added\n", __func__); goto bail2; }