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 _DEFUN (envz_remove
, (envz
, envz_len
, name
),
22 entry
= envz_entry (*envz
, *envz_len
, name
);
26 len
= strlen(entry
) + 1;
28 /* Not the last entry. */
29 if (*envz
+ *envz_len
!= entry
+ len
- 1)
31 memmove(entry
, entry
+ len
, *envz
+ *envz_len
- entry
- len
);
34 *envz
= (char *)realloc(*envz
, *envz_len
- len
);