diff --git a/drivers/audio/sb16/mixer.c b/drivers/audio/sb16/mixer.c index 770af03ea..f276b1e87 100644 --- a/drivers/audio/sb16/mixer.c +++ b/drivers/audio/sb16/mixer.c @@ -172,8 +172,8 @@ PRIVATE int get_set_input(struct inout_ctrl *input, int flag, int channel) { mixer_set(input_cmd, mask); } else { /* Get input */ if (shift > 0) { - input->left = ((mask >> (shift+1)) & 1 == 1 ? ON : OFF); - input->right = ((mask >> shift) & 1 == 1 ? ON : OFF); + input->left = (((mask >> (shift+1)) & 1) == 1 ? ON : OFF); + input->right = (((mask >> shift) & 1) == 1 ? ON : OFF); } else { input->left = ((mask & 1) == 1 ? ON : OFF); } @@ -220,8 +220,8 @@ PRIVATE int get_set_output(struct inout_ctrl *output, int flag) { mixer_set(MIXER_OUTPUT_CTRL, mask); } else { /* Get input */ if (shift > 0) { - output->left = ((mask >> (shift+1)) & 1 == 1 ? ON : OFF); - output->right = ((mask >> shift) & 1 == 1 ? ON : OFF); + output->left = (((mask >> (shift+1)) & 1) == 1 ? ON : OFF); + output->right = (((mask >> shift) & 1) == 1 ? ON : OFF); } else { output->left = ((mask & 1) == 1 ? ON : OFF); } @@ -250,4 +250,4 @@ PUBLIC int mixer_get(int reg) { sb16_outb(MIXER_REG, reg); for(i = 0; i < 100; i++); return sb16_inb(MIXER_DATA) & 0xff; -} \ No newline at end of file +} diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index 0f8ca0e60..e806bda21 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -1482,7 +1482,7 @@ int vectored; goto suspend; } - if (!rfd_status & RFDS_OK) + if (!(rfd_status & RFDS_OK)) { /* Not OK? What happened? */ assert(0); @@ -1662,7 +1662,7 @@ int from_int; goto suspend; } - if (!rfd_status & RFDS_OK) + if (!(rfd_status & RFDS_OK)) { /* Not OK? What happened? */ assert(0);