net: initialize variables to avoid UML compilation failure

While compiling for usermode linux for x86 architecture, observed
compilation issues with probable usage of uninitialized variables.
This change initializes the variables.

Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
This commit is contained in:
Jeevan Shriram 2016-03-15 12:16:16 -07:00 committed by David Keitel
parent 28e3a4040e
commit 643a137249
4 changed files with 4 additions and 4 deletions

View file

@ -1316,7 +1316,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr,
SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
{
struct kioctx *ioctx = NULL;
unsigned long ctx;
unsigned long ctx = 0;
long ret;
ret = get_user(ctx, ctxp);

View file

@ -1264,7 +1264,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
int retval = -EINVAL;
#ifdef CONFIG_MMU
loff_t size = 0;
struct file *file;
struct file *file = NULL;
struct vm_area_struct *next;
#endif

View file

@ -1694,7 +1694,7 @@ struct fib_table *fib_trie_unmerge(struct fib_table *oldtb)
lt = (struct trie *)local_tb->tb_data;
while ((l = leaf_walk_rcu(&tp, key)) != NULL) {
struct key_vector *local_l = NULL, *local_tp;
struct key_vector *local_l = NULL, *local_tp = NULL;
hlist_for_each_entry_rcu(fa, &l->leaf, fa_list) {
struct fib_alias *new_fa;

View file

@ -123,7 +123,7 @@ EXPORT_SYMBOL(nf_register_net_hook);
void nf_unregister_net_hook(struct net *net, const struct nf_hook_ops *reg)
{
struct list_head *hook_list;
struct nf_hook_entry *entry;
struct nf_hook_entry *entry = NULL;
struct nf_hook_ops *elem;
hook_list = nf_find_hook_list(net, reg);