Bundle *AppendBundle(Bundle **start, char *name, char *type, Rlist *args) { Bundle *bp, *lp; CfDebug("Appending new bundle %s %s (", type, name); if (DEBUG) { ShowRlist(stdout, args); } CfDebug(")\n"); CheckBundle(name, type); bp = xcalloc(1, sizeof(Bundle)); if (*start == NULL) { *start = bp; } else { for (lp = *start; lp->next != NULL; lp = lp->next) { } lp->next = bp; } bp->name = xstrdup(name); bp->type = xstrdup(type); bp->args = args; return bp; }
struct Bundle *AppendBundle(struct Bundle **start,char *name, char *type, struct Rlist *args) { struct Bundle *bp,*lp; if (INSTALL_SKIP) { return NULL; } Debug("Appending new bundle %s %s (",type,name); if (DEBUG) { ShowRlist(stdout,args); } Debug(")\n"); CheckBundle(name,type); if ((bp = (struct Bundle *)malloc(sizeof(struct Bundle))) == NULL) { CfOut(cf_error,"malloc","Unable to alloc Bundle"); FatalError(""); } if (*start == NULL) { *start = bp; } else { for (lp = *start; lp->next != NULL; lp=lp->next) { } lp->next = bp; } bp->name = strdup(name); bp->next = NULL; bp->type = strdup(type); bp->args = args; bp->subtypes = NULL; return bp; }