Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33aa8da1 authored by Shanthosh RK's avatar Shanthosh RK Committed by David S. Miller
Browse files

net: bpfilter: Fix type cast and pointer warnings



Fixes the following Sparse warnings:

net/bpfilter/bpfilter_kern.c:62:21: warning: cast removes address space
of expression
net/bpfilter/bpfilter_kern.c:101:49: warning: Using plain integer as
NULL pointer

Signed-off-by: default avatarShanthosh RK <shanthosh.rk@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c05d888
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static int __bpfilter_process_sockopt(struct sock *sk, int optname,
	req.is_set = is_set;
	req.pid = current->pid;
	req.cmd = optname;
	req.addr = (long)optval;
	req.addr = (long __force __user)optval;
	req.len = optlen;
	mutex_lock(&bpfilter_lock);
	if (!info.pid)
@@ -98,7 +98,7 @@ static int __init load_umh(void)
	pr_info("Loaded bpfilter_umh pid %d\n", info.pid);

	/* health check that usermode process started correctly */
	if (__bpfilter_process_sockopt(NULL, 0, 0, 0, 0) != 0) {
	if (__bpfilter_process_sockopt(NULL, 0, NULL, 0, 0) != 0) {
		stop_umh();
		return -EFAULT;
	}