mm/madvise.c: make madvise_behaviour_valid() return bool
authorNicholas Krause <xerofoify@gmail.com>
Fri, 4 Sep 2015 22:48:24 +0000 (15:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
This makes the madvise_bahaviour_valid() function return bool due to
this particular function always returning the value of either one or
zero as its return value.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/madvise.c

index 911357973905938c3b1a4ccb3bc4e2a2c95abc1d..ce3a4222c7e7ae4558b201704a0ee5d55518fcfc 100644 (file)
@@ -386,7 +386,7 @@ madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev,
        }
 }
 
-static int
+static bool
 madvise_behavior_valid(int behavior)
 {
        switch (behavior) {
@@ -408,10 +408,10 @@ madvise_behavior_valid(int behavior)
 #endif
        case MADV_DONTDUMP:
        case MADV_DODUMP:
-               return 1;
+               return true;
 
        default:
-               return 0;
+               return false;
        }
 }