mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-14 12:37:22 +00:00
'lib/helper.c' - str2uchar() - renamed arg_long -> arg_ulong
This commit is contained in:
parent
e0b75fba8c
commit
3423c1d92f
@ -282,16 +282,16 @@ int str2ushort(const char * str, uint16_t * ushrt_ptr)
|
|||||||
int str2uchar(const char * str, uint8_t * uchr_ptr)
|
int str2uchar(const char * str, uint8_t * uchr_ptr)
|
||||||
{
|
{
|
||||||
int rc = (-3);
|
int rc = (-3);
|
||||||
int64_t arg_long = 0;
|
int64_t arg_ulong = 0;
|
||||||
if ( (rc = str2ulong(str, &arg_long)) != 0 ) {
|
if ( (rc = str2ulong(str, &arg_ulong)) != 0 ) {
|
||||||
*uchr_ptr = 0;
|
*uchr_ptr = 0;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg_long > UINT8_MAX)
|
if (arg_ulong > UINT8_MAX)
|
||||||
return (-3);
|
return (-3);
|
||||||
|
|
||||||
*uchr_ptr = (uint8_t)arg_long;
|
*uchr_ptr = (uint8_t)arg_ulong;
|
||||||
return 0;
|
return 0;
|
||||||
} /* str2uchar(...) */
|
} /* str2uchar(...) */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user