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_flag.c
int cap_clear_flag(cap_t cap_d, cap_flag_t flag)
{
    switch (flag)
    {
        case CAP_EFFECTIVE:
        case CAP_PERMITTED:
        case CAP_INHERITABLE:
            if (good_cap_t(cap_d))
            {
                unsigned i;

                for (i = 0; i < _LIBCAP_CAPABILITY_U32S; i++)
                {
                    cap_d->u[i].flat[flag] = 0;
                }
                return 0;
            }
            /*
             * fall through
             */

        default:
            _cap_debug("invalid pointer");
            errno = EINVAL;
            return -1;
    }
}
/*
 *  Reset the all of the capability bits for one of the flag sets
 */
Reset the all of the capability bits for one of the flag sets
Reset the all of the capability bits for one of the flag sets
int cap_clear_flag(cap_t cap_d, cap_flag_t flag)
{
    switch (flag)
    {
        case CAP_EFFECTIVE:
        case CAP_PERMITTED:
        case CAP_INHERITABLE:
            if (good_cap_t(cap_d))
            {
                unsigned i;
                for (i = 0; i < _LIBCAP_CAPABILITY_U32S; i++)
                {
                    cap_d->u[i].flat[flag] = 0;
                }
                return 0;
            }
        default:
            _cap_debug("invalid pointer");
            errno = EINVAL;
            return -1;
    }
}
int cap_clear_flag ( cap_t cap_d , cap_flag_t flag ) { switch ( flag ) { case CAP_EFFECTIVE : case CAP_PERMITTED : case CAP_INHERITABLE : if ( good_cap_t ( cap_d ) ) { unsigned i ; for ( i = 0 ; i < _LIBCAP_CAPABILITY_U32S ; i ++ ) { cap_d -> u [ i ] . flat [ flag ] = 0 ; } return 0 ; } default : _cap_debug ( " " ) ; errno = EINVAL ; return -1 ; } }
Reset the all of the capability bits for one of the flag sets
Reset the all of the capability bits for one of the flag sets
/*
             * fall through
             */