* libmisc/cleanup.c: Fix del_cleanup. The arguments were not
desynchronized with the cleanup functions. * libmisc/cleanup.c: cleanup_function_args is an array of void pointer, not strings.
This commit is contained in:
parent
80135cdc17
commit
9fda9f5c28
@ -1,3 +1,10 @@
|
|||||||
|
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* libmisc/cleanup.c: Fix del_cleanup. The arguments were not
|
||||||
|
desynchronized with the cleanup functions.
|
||||||
|
* libmisc/cleanup.c: cleanup_function_args is an array of void
|
||||||
|
pointer, not strings.
|
||||||
|
|
||||||
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* libmisc/find_new_gid.c: Fix find_new_gid() the current group
|
* libmisc/find_new_gid.c: Fix find_new_gid() the current group
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
#define CLEANUP_FUNCTIONS 10
|
#define CLEANUP_FUNCTIONS 10
|
||||||
static cleanup_function cleanup_functions[CLEANUP_FUNCTIONS];
|
static cleanup_function cleanup_functions[CLEANUP_FUNCTIONS];
|
||||||
static const char * cleanup_function_args[CLEANUP_FUNCTIONS];
|
static void * cleanup_function_args[CLEANUP_FUNCTIONS];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* - Cleanup functions shall not fail.
|
* - Cleanup functions shall not fail.
|
||||||
@ -113,8 +113,10 @@ void del_cleanup (cleanup_function pcf)
|
|||||||
|
|
||||||
if (i == (CLEANUP_FUNCTIONS -1)) {
|
if (i == (CLEANUP_FUNCTIONS -1)) {
|
||||||
cleanup_functions[i] = NULL;
|
cleanup_functions[i] = NULL;
|
||||||
|
cleanup_function_args[i] = NULL;
|
||||||
} else {
|
} else {
|
||||||
cleanup_functions[i] = cleanup_functions[i+1];
|
cleanup_functions[i] = cleanup_functions[i+1];
|
||||||
|
cleanup_function_args[i] = cleanup_function_args[i+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A NULL indicates the end of the stack */
|
/* A NULL indicates the end of the stack */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user