openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/libmisc/cleanup.c
void add_cleanup(/*@notnull@*/ cleanup_function pcf, /*@null@*/ void* arg)
{
    unsigned int i;
    assert(NULL != pcf);

    assert(NULL == cleanup_functions[CLEANUP_FUNCTIONS - 2]);

    if (0 == cleanup_pid)
    {
        cleanup_pid = getpid();
    }

    /* Add the cleanup_function at the end of the stack */
    for (i = 0; NULL != cleanup_functions[i]; i++)
        ;
    cleanup_functions[i] = pcf;
    cleanup_function_args[i] = arg;
}
/*
 * add_cleanup - Add a cleanup_function to the cleanup_functions stack.
 */
Add a cleanup_function to the cleanup_functions stack.
Add a cleanup_function to the cleanup_functions stack .
void add_cleanup( cleanup_function pcf,  void* arg)
{
    unsigned int i;
    assert(NULL != pcf);
    assert(NULL == cleanup_functions[CLEANUP_FUNCTIONS - 2]);
    if (0 == cleanup_pid)
    {
        cleanup_pid = getpid();
    }
    for (i = 0; NULL != cleanup_functions[i]; i++)
        ;
    cleanup_functions[i] = pcf;
    cleanup_function_args[i] = arg;
}
void add_cleanup ( cleanup_function pcf , void * arg ) { unsigned int i ; assert ( NULL != pcf ) ; assert ( NULL == cleanup_functions [ CLEANUP_FUNCTIONS - 2 ] ) ; if ( 0 == cleanup_pid ) { cleanup_pid = getpid ( ) ; } for ( i = 0 ; NULL != cleanup_functions [ i ] ; i ++ ) ; cleanup_functions [ i ] = pcf ; cleanup_function_args [ i ] = arg ; }
add_cleanup - Add a cleanup_function to the cleanup_functions stack.
add_cleanup - Add a cleanup_function to the cleanup_functions stack .
/*@notnull@*/ /*@null@*/ /* Add the cleanup_function at the end of the stack */