openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libcap/2.27-r0/libcap-2.27/libcap/cap_proc.c
cap_t cap_get_pid(pid_t pid)
{
    cap_t result;

    result = cap_init();
    if (result)
    {
        if (capgetp(pid, result) != 0)
        {
            int my_errno;

            my_errno = errno;
            cap_free(result);
            errno = my_errno;
            result = NULL;
        }
    }

    return result;
}
/* allocate space for and return capabilities of target process */
allocate space for and return capabilities of target process
allocate space for and return capabilities of target process
cap_t cap_get_pid(pid_t pid)
{
    cap_t result;
    result = cap_init();
    if (result)
    {
        if (capgetp(pid, result) != 0)
        {
            int my_errno;
            my_errno = errno;
            cap_free(result);
            errno = my_errno;
            result = NULL;
        }
    }
    return result;
}
cap_t cap_get_pid ( pid_t pid ) { cap_t result ; result = cap_init ( ) ; if ( result ) { if ( capgetp ( pid , result ) != 0 ) { int my_errno ; my_errno = errno ; cap_free ( result ) ; errno = my_errno ; result = NULL ; } } return result ; }
allocate space for and return capabilities of target process
allocate space for and return capabilities of target process