equal
deleted
inserted
replaced
60 |
60 |
61 static struct flist *lalloc(int size) |
61 static struct flist *lalloc(int size) |
62 { |
62 { |
63 struct flist *a = NULL; |
63 struct flist *a = NULL; |
64 |
64 |
|
65 if (size < 1) |
|
66 size = 1; |
|
67 |
65 a = (struct flist *)malloc(sizeof(struct flist)); |
68 a = (struct flist *)malloc(sizeof(struct flist)); |
66 if (a) { |
69 if (a) { |
67 a->base = (struct frag *)malloc(sizeof(struct frag) * size); |
70 a->base = (struct frag *)malloc(sizeof(struct frag) * size); |
68 if (a->base) { |
71 if (a->base) { |
69 a->head = a->tail = a->base; |
72 a->head = a->tail = a->base; |