lkml.org 
[lkml]   [2001]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: if (a & X || b & ~Y) in dasd.c
At 3:57 PM -0500 11/8/01, Pete Zaitcev wrote:
>Carsten and others:
>
>this code in 2.2.14 looks suspicious to me:
>
>./drivers/s390/block/dasd.c:
> /* first of all lets try to find out the appropriate era_action */
> if (stat->flag & DEVSTAT_FLAG_SENSE_AVAIL ||
> stat->dstat & ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) {
> /* anything abnormal ? */
> if (device->discipline->examine_error == NULL ||
> stat->flag & DEVSTAT_HALT_FUNCTION) {
> era = dasd_era_fatal;
> } else {
> era = device->discipline->examine_error (cqr, stat);
> }
> DASD_DRIVER_DEBUG_EVENT (1, dasd_int_handler," era_code %d",
> era);
> }
>
>Are you sure any parenthesises are not needed here?

It's OK. You're probably used to seeing (necessary) parens when || is
replaced by == in this kind of expression.
--
/Jonathan Lundell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.050 / U:4.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site