[NET]: Conversions from kmalloc+memset to k(z|c)alloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Panagiotis Issaris
2006-07-21 14:51:30 -07:00
committed by David S. Miller
parent a0ee7c70b2
commit 0da974f4f3
94 changed files with 154 additions and 334 deletions

View File

@@ -32,9 +32,8 @@ svc_create(struct svc_program *prog, unsigned int bufsize)
int vers;
unsigned int xdrsize;
if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL)))
if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
return NULL;
memset(serv, 0, sizeof(*serv));
serv->sv_name = prog->pg_name;
serv->sv_program = prog;
serv->sv_nrthreads = 1;
@@ -159,11 +158,10 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv)
struct svc_rqst *rqstp;
int error = -ENOMEM;
rqstp = kmalloc(sizeof(*rqstp), GFP_KERNEL);
rqstp = kzalloc(sizeof(*rqstp), GFP_KERNEL);
if (!rqstp)
goto out;
memset(rqstp, 0, sizeof(*rqstp));
init_waitqueue_head(&rqstp->rq_wait);
if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL))