openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/bus/config-parser.c
static dbus_bool_t parse_int_attribute(const char* name, const char* content,
                                       long min, long max, long def,
                                       long* value, DBusError* error)
{
    DBusString parse_string;

    *value = def;

    if (content == NULL)
        return TRUE;

    _dbus_string_init_const(&parse_string, content);

    if (!_dbus_string_parse_int(&parse_string, 0, value, NULL) ||
        *value < min || *value > max)
    {
        dbus_set_error(error, DBUS_ERROR_FAILED,
                       "Bad value \"%s\" for %s attribute, must be an "
                       "integer in range %ld to %ld inclusive",
                       content, name, min, max);
        return FALSE;
    }

    return TRUE;
}
/*
 * Parse an attribute named name, whose content is content, or NULL if
 * missing. It is meant to be a (long) integer between min and max inclusive.
 * If it is missing, use def as the default value (which does not
 * necessarily need to be between min and max).
 */
Parse an attribute named name, whose content is content, or NULL if
missing. It is meant to be a (long) integer between min and max inclusive.
If it is missing, use def as the default value (which does not
necessarily need to be between min and max).
Parse an attribute named name whose content is content or NULL if missing . It is meant to be a ( long ) integer between min and max inclusive . If it is missing use def as the default value ( which does not necessarily need to be between min and max ) .
static dbus_bool_t parse_int_attribute(const char* name, const char* content,
                                       long min, long max, long def,
                                       long* value, DBusError* error)
{
    DBusString parse_string;
    *value = def;
    if (content == NULL)
        return TRUE;
    _dbus_string_init_const(&parse_string, content);
    if (!_dbus_string_parse_int(&parse_string, 0, value, NULL) ||
        *value < min || *value > max)
    {
        dbus_set_error(error, DBUS_ERROR_FAILED,
                       "Bad value \"%s\" for %s attribute, must be an "
                       "integer in range %ld to %ld inclusive",
                       content, name, min, max);
        return FALSE;
    }
    return TRUE;
}
static dbus_bool_t parse_int_attribute ( const char * name , const char * content , long min , long max , long def , long * value , DBusError * error ) { DBusString parse_string ; * value = def ; if ( content == NULL ) return TRUE ; _dbus_string_init_const ( & parse_string , content ) ; if ( ! _dbus_string_parse_int ( & parse_string , 0 , value , NULL ) || * value < min || * value > max ) { dbus_set_error ( error , DBUS_ERROR_FAILED , " \" \" " " " , content , name , min , max ) ; return FALSE ; } return TRUE ; }
Parse an attribute named name, whose content is content, or NULL if
 missing.
Parse an attribute named name whose content is content or NULL if missing .