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_remove (char **envz
,
21 entry
= envz_entry (*envz
, *envz_len
, name
);
25 len
= strlen(entry
) + 1;
27 /* Not the last entry. */
28 if (*envz
+ *envz_len
!= entry
+ len
- 1)
30 memmove(entry
, entry
+ len
, *envz
+ *envz_len
- entry
- len
);
33 *envz
= (char *)realloc(*envz
, *envz_len
- len
);