Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30390
b: refs/heads/master
c: 9ab230f
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 26, 2006
1 parent 29b7d70 commit af42eac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 5e3c8854c1898828ffb0141d4ac4e6190aa9eb4e
refs/heads/master: 9ab230f82f404e534387dda6067072291441a34d
18 changes: 9 additions & 9 deletions trunk/net/tipc/name_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,18 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq,
/* Ensure there is space for new sub-sequence */

if (nseq->first_free == nseq->alloc) {
struct sub_seq *sseqs = nseq->sseqs;
nseq->sseqs = tipc_subseq_alloc(nseq->alloc * 2);
if (nseq->sseqs != NULL) {
memcpy(nseq->sseqs, sseqs,
nseq->alloc * sizeof (struct sub_seq));
kfree(sseqs);
dbg("Allocated %u sseqs\n", nseq->alloc);
nseq->alloc *= 2;
} else {
struct sub_seq *sseqs = tipc_subseq_alloc(nseq->alloc * 2);

if (!sseqs) {
warn("Memory squeeze; failed to create sub-sequence\n");
return NULL;
}
dbg("Allocated %u more sseqs\n", nseq->alloc);
memcpy(sseqs, nseq->sseqs,
nseq->alloc * sizeof(struct sub_seq));
kfree(nseq->sseqs);
nseq->sseqs = sseqs;
nseq->alloc *= 2;
}
dbg("Have %u sseqs for type %u\n", nseq->alloc, type);

Expand Down

0 comments on commit af42eac

Please sign in to comment.