]> git.neil.brown.name Git - history.git/commitdiff
Don't use signed one-bit bitfields.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 10:10:29 +0000 (03:10 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 10:10:29 +0000 (03:10 -0700)
We assign 0 and 1 to it, but since it's signed, that's
actually already overflowing the poor thing. So make
it unsigned, which is what it really was supposed to be
in the first place.

include/linux/writeback.h

index 42157f942fa31c5fa8c82cd2911a5f72d61978c9..061865cfe82c551ecec96e0f3d38e49a5ecd1aa3 100644 (file)
@@ -51,10 +51,10 @@ struct writeback_control {
        loff_t start;
        loff_t end;
 
-       int nonblocking:1;              /* Don't get stuck on request queues */
-       int encountered_congestion:1;   /* An output: a queue is full */
-       int for_kupdate:1;              /* A kupdate writeback */
-       int for_reclaim:1;              /* Invoked from the page allocator */
+       unsigned nonblocking:1;                 /* Don't get stuck on request queues */
+       unsigned encountered_congestion:1;      /* An output: a queue is full */
+       unsigned for_kupdate:1;                 /* A kupdate writeback */
+       unsigned for_reclaim:1;                 /* Invoked from the page allocator */
 };
 
 /*