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_merge (char **envz
,
22 char *name_str
= NULL
;
24 char *name_iter
= NULL
;
27 while((entry
= argz_next((char *)envz2
, envz2_len
, entry
)) && !retval
)
31 name_str
= strdup (entry
);
32 name_iter
= strchr(name_str
, '=');
36 if(!envz_entry(*envz
, *envz_len
, name_str
))
38 retval
= argz_add(envz
, envz_len
, entry
);
44 name_str
= strdup (entry
);
45 name_iter
= strchr(name_str
, '=');
49 val_str
= name_iter
+ 1;
56 retval
= envz_add(envz
, envz_len
, name_str
, val_str
);