Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
mm/madvise.c: make madvise_behaviour_valid() return bool
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Nicholas Krause authored and torvalds committed Sep 4, 2015
1 parent ca1d6c7 commit 1ecef9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
}

Expand Down

0 comments on commit 1ecef9e

Please sign in to comment.