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 9113579..ce3a422 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;
        }
 }