Changeset 25478
- Timestamp:
- 05/12/08 16:48:03 (6 months ago)
- Files:
-
- 1 modified
-
haiku/trunk/src/system/libroot/posix/stdlib/env.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/src/system/libroot/posix/stdlib/env.c
r21715 r25478 24 24 25 25 26 // TODO: Use benaphore! 26 27 static sem_id sEnvLock; 27 28 static bool sCopied; … … 213 214 env = find_variable(name, length, &index); 214 215 if (env != NULL) { 215 // we don't free the memory for the slot, we just move the array contents 216 // we don't free the memory for the slot, we just move the array 217 // contents 216 218 free(env); 217 memmove(environ + index, environ + index + 1, sizeof(char *) * (count_variables() + 1)); 219 memmove(environ + index, environ + index + 1, 220 sizeof(char *) * (count_variables() - index)); 218 221 } 219 222
