1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
15 envz_add (char **envz
,
25 envz_remove(envz
, envz_len
, name
);
29 name_len
= strlen(name
);
30 val_len
= strlen(value
);
31 if(!(concat
= (char *) malloc(name_len
+ val_len
+ 2)))
34 memcpy(concat
, name
, name_len
);
35 concat
[name_len
] = '=';
36 memcpy(concat
+ name_len
+ 1, value
, val_len
+ 1);
38 retval
= argz_add(envz
, envz_len
, concat
);
43 retval
= argz_add(envz
, envz_len
, name
);