pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:2530:   }      /* Makes a copy of a.    * Note: Can throw errors on out of memory.    */   static struct used_vars *copy_vars(struct used_vars *a)   {    struct used_vars *ret;    struct scope_info *src;    struct scope_info **dst; -  ret=xalloc(sizeof(struct used_vars)); +  ret=ALLOC_STRUCT(used_vars);    src = a->locals;    dst = &(ret->locals);    *dst = NULL;    while (src) {    *dst = malloc(sizeof(struct scope_info));    if (!*dst) {    src = ret->locals;    while(src) {    struct scope_info *tmp = src->next;    free(src);