Skip to content

Commit

Permalink
[PATCH] deadline: clean up question mark operator
Browse files Browse the repository at this point in the history
That ?: trick gives us the creeps.

Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Sep 9, 2005
1 parent 24b20ac commit 9d5c1e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/block/deadline-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,10 @@ static int deadline_dispatch_requests(struct deadline_data *dd)
/*
* batches are currently reads XOR writes
*/
drq = dd->next_drq[WRITE] ? : dd->next_drq[READ];
if (dd->next_drq[WRITE])
drq = dd->next_drq[WRITE];
else
drq = dd->next_drq[READ];

if (drq) {
/* we have a "next request" */
Expand Down

0 comments on commit 9d5c1e1

Please sign in to comment.