Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41865
b: refs/heads/master
c: 2710b57
h: refs/heads/master
i:
  41863: 4995579
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Dec 3, 2006
1 parent c18eaae commit bf4e76b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e69062b4f728dca01ec1a9eb4ed55b73a374f164
refs/heads/master: 2710b57ff9b1437cfbe96b23ae86fedf3239f1ca
6 changes: 2 additions & 4 deletions trunk/net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ int tipc_bclink_set_queue_limits(u32 limit)

int tipc_bclink_init(void)
{
bcbearer = kmalloc(sizeof(*bcbearer), GFP_ATOMIC);
bclink = kmalloc(sizeof(*bclink), GFP_ATOMIC);
bcbearer = kzalloc(sizeof(*bcbearer), GFP_ATOMIC);
bclink = kzalloc(sizeof(*bclink), GFP_ATOMIC);
if (!bcbearer || !bclink) {
nomem:
warn("Multicast link creation failed, no memory\n");
Expand All @@ -786,14 +786,12 @@ int tipc_bclink_init(void)
return -ENOMEM;
}

memset(bcbearer, 0, sizeof(struct bcbearer));
INIT_LIST_HEAD(&bcbearer->bearer.cong_links);
bcbearer->bearer.media = &bcbearer->media;
bcbearer->media.send_msg = tipc_bcbearer_send;
sprintf(bcbearer->media.name, "tipc-multicast");

bcl = &bclink->link;
memset(bclink, 0, sizeof(struct bclink));
INIT_LIST_HEAD(&bcl->waiting_ports);
bcl->next_out_no = 1;
spin_lock_init(&bclink->node.lock);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/tipc/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct node *tipc_node_create(u32 addr)
struct node *n_ptr;
struct node **curr_node;

n_ptr = kmalloc(sizeof(*n_ptr),GFP_ATOMIC);
n_ptr = kzalloc(sizeof(*n_ptr),GFP_ATOMIC);
if (!n_ptr) {
warn("Node creation failed, no memory\n");
return NULL;
Expand All @@ -75,7 +75,6 @@ struct node *tipc_node_create(u32 addr)
return NULL;
}

memset(n_ptr, 0, sizeof(*n_ptr));
n_ptr->addr = addr;
spin_lock_init(&n_ptr->lock);
INIT_LIST_HEAD(&n_ptr->nsub);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit bf4e76b

Please sign in to comment.