Return to vars.c CVS log | Up to [local] / src / usr.bin / mail |
version 1.7, 2001/11/21 15:26:39 | version 1.8, 2001/11/21 20:41:56 | ||
---|---|---|---|
|
|
||
h = hash(name); | h = hash(name); | ||
vp = lookup(name); | vp = lookup(name); | ||
if (vp == NULL) { | if (vp == NULL) { | ||
vp = (struct var *)calloc(sizeof(*vp), 1); | if ((vp = (struct var *)calloc(sizeof(*vp), 1)) == NULL) | ||
errx(1, "Out of memory"); | |||
vp->v_name = vcopy(name); | vp->v_name = vcopy(name); | ||
vp->v_link = variables[h]; | vp->v_link = variables[h]; | ||
variables[h] = vp; | variables[h] = vp; |