aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@engr.sgi.com>2004-09-13 17:51:00 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-13 17:51:00 -0700
commitb08b6ae839d5ababcb7d848d6ace16a0adcdbd24 (patch)
tree23c0ddc3496f3aafb974837902da84ba99383b32 /mm
parentea0547ed98831a43939f64e364a3c28627690b70 (diff)
downloadhistory-b08b6ae839d5ababcb7d848d6ace16a0adcdbd24.tar.gz
[PATCH] fix uninitialized warnings in mempolicy.c
err may be used uninitialized in mempolicy.c in both compat_set_mempolicy and compat_mbind. This patch fixes that by setting them both to 0. Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index c87295c4b8d07d..9b59ac453269de 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -557,7 +557,7 @@ asmlinkage long compat_get_mempolicy(int __user *policy,
asmlinkage long compat_set_mempolicy(int mode, compat_ulong_t __user *nmask,
compat_ulong_t maxnode)
{
- long err;
+ long err = 0;
unsigned long __user *nm = NULL;
unsigned long nr_bits, alloc_size;
DECLARE_BITMAP(bm, MAX_NUMNODES);
@@ -581,7 +581,7 @@ asmlinkage long compat_mbind(compat_ulong_t start, compat_ulong_t len,
compat_ulong_t mode, compat_ulong_t __user *nmask,
compat_ulong_t maxnode, compat_ulong_t flags)
{
- long err;
+ long err = 0;
unsigned long __user *nm = NULL;
unsigned long nr_bits, alloc_size;
DECLARE_BITMAP(bm, MAX_NUMNODES);