summaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-21 01:22:12 -0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:30:21 -0800
commit2710b57ff9b1437cfbe96b23ae86fedf3239f1ca (patch)
tree6395382004f63722a23e13d8997362104a91243d /net/tipc/subscr.c
parente69062b4f728dca01ec1a9eb4ed55b73a374f164 (diff)
downloadlinux-stable-2710b57ff9b1437cfbe96b23ae86fedf3239f1ca.tar.gz
linux-stable-2710b57ff9b1437cfbe96b23ae86fedf3239f1ca.tar.bz2
linux-stable-2710b57ff9b1437cfbe96b23ae86fedf3239f1ca.zip
[TIPC]: Use kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/tipc/subscr.c')
-rw-r--r--net/tipc/subscr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 7a918f12a5df..ddade7388aa0 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -350,7 +350,7 @@ static void subscr_subscribe(struct tipc_subscr *s,
/* Allocate subscription object */
- sub = kmalloc(sizeof(*sub), GFP_ATOMIC);
+ sub = kzalloc(sizeof(*sub), GFP_ATOMIC);
if (!sub) {
warn("Subscription rejected, no memory\n");
subscr_terminate(subscriber);
@@ -359,7 +359,6 @@ static void subscr_subscribe(struct tipc_subscr *s,
/* Initialize subscription object */
- memset(sub, 0, sizeof(*sub));
sub->seq.type = htohl(s->seq.type, subscriber->swap);
sub->seq.lower = htohl(s->seq.lower, subscriber->swap);
sub->seq.upper = htohl(s->seq.upper, subscriber->swap);