mercurial/mpatch.c
changeset 1978 10606ee61107
parent 1746 299c3e26ee45
child 2048 8f9660c568b8
child 2078 441ea218414e
equal deleted inserted replaced
1977:7eb694a1c1af 1978:10606ee61107
    56 
    56 
    57 static struct flist *lalloc(int size)
    57 static struct flist *lalloc(int size)
    58 {
    58 {
    59 	struct flist *a = NULL;
    59 	struct flist *a = NULL;
    60 
    60 
    61 	a = malloc(sizeof(struct flist));
    61 	a = (struct flist *)malloc(sizeof(struct flist));
    62 	if (a) {
    62 	if (a) {
    63 		a->base = malloc(sizeof(struct frag) * size);
    63 		a->base = (struct frag *)malloc(sizeof(struct frag) * size);
    64 		if (!a->base) {
    64 		if (!a->base) {
    65 			free(a);
    65 			free(a);
    66 			a = NULL;
    66 			a = NULL;
    67 		} else
    67 		} else
    68 			a->head = a->tail = a->base;
    68 			a->head = a->tail = a->base;