[PATCH] fix uninitialized warnings in mempolicy.c

From: Jesse Barnes
Date: Fri Sep 10 2004 - 17:25:15 EST


Sorry if you already got these fixes, but 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@xxxxxxx>
===== mm/mempolicy.c 1.14 vs edited =====
--- 1.14/mm/mempolicy.c 2004-09-07 23:32:56 -07:00
+++ edited/mm/mempolicy.c 2004-09-10 15:16:51 -07:00
@@ -557,7 +557,7 @@
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 @@
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);