openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/src/lib/utils.c
uint32_t nl_cli_parse_u32(const char* arg)
{
    unsigned long lval;
    char* endptr;

    lval = strtoul(arg, &endptr, 0);
    if (endptr == arg || lval == ULONG_MAX)
        nl_cli_fatal(EINVAL, "Unable to parse \"%s\", not a number.", arg);

    return (uint32_t)lval;
}
/**
 * Parse a text based 32 bit unsigned integer argument
 * @arg arg		Integer in text form.
 *
 * Tries to convert the number provided in arg to a uint32_t. Will call
 * nl_cli_fatal() if the conversion fails.
 *
 * @return 32bit unsigned integer.
 */
Parse a text based 32 bit unsigned integer argument
@arg arg             Integer in text form.

Tries to convert the number provided in arg to a uint32_t. Will call
nl_cli_fatal() if the conversion fails.

@return 32bit unsigned integer.
Parse a text based 32 bit unsigned integer argument @arg arg Integer in text form . Tries to convert the number provided in arg to a uint32_t . Will call nl_cli_fatal () if the conversion fails . @return 32bit unsigned integer .
uint32_t nl_cli_parse_u32(const char* arg)
{
    unsigned long lval;
    char* endptr;
    lval = strtoul(arg, &endptr, 0);
    if (endptr == arg || lval == ULONG_MAX)
        nl_cli_fatal(EINVAL, "Unable to parse \"%s\", not a number.", arg);
    return (uint32_t)lval;
}
uint32_t nl_cli_parse_u32 ( const char * arg ) { unsigned long lval ; char * endptr ; lval = strtoul ( arg , & endptr , 0 ) ; if ( endptr == arg || lval == ULONG_MAX ) nl_cli_fatal ( EINVAL , " \" \" " , arg ) ; return ( uint32_t ) lval ; }
Parse a text based 32 bit unsigned integer argument
 @arg arg             Integer in text form.
Parse a text based 32 bit unsigned integer argument @arg arg Integer in text form .