Use standard unsigned integer types
This commit is contained in:
@@ -540,9 +540,9 @@ METHOD(settings_t, get_int, int,
|
||||
/**
|
||||
* Described in header
|
||||
*/
|
||||
inline u_int64_t settings_value_as_uint64(char *value, u_int64_t def)
|
||||
inline uint64_t settings_value_as_uint64(char *value, uint64_t def)
|
||||
{
|
||||
u_int64_t intval;
|
||||
uint64_t intval;
|
||||
char *end;
|
||||
int base = 10;
|
||||
|
||||
@@ -597,10 +597,10 @@ METHOD(settings_t, get_double, double,
|
||||
/**
|
||||
* Described in header
|
||||
*/
|
||||
inline u_int32_t settings_value_as_time(char *value, u_int32_t def)
|
||||
inline uint32_t settings_value_as_time(char *value, uint32_t def)
|
||||
{
|
||||
char *endptr;
|
||||
u_int32_t timeval;
|
||||
uint32_t timeval;
|
||||
if (value)
|
||||
{
|
||||
errno = 0;
|
||||
@@ -638,8 +638,8 @@ inline u_int32_t settings_value_as_time(char *value, u_int32_t def)
|
||||
return def;
|
||||
}
|
||||
|
||||
METHOD(settings_t, get_time, u_int32_t,
|
||||
private_settings_t *this, char *key, u_int32_t def, ...)
|
||||
METHOD(settings_t, get_time, uint32_t,
|
||||
private_settings_t *this, char *key, uint32_t def, ...)
|
||||
{
|
||||
char *value;
|
||||
va_list args;
|
||||
@@ -695,7 +695,7 @@ METHOD(settings_t, set_double, void,
|
||||
}
|
||||
|
||||
METHOD(settings_t, set_time, void,
|
||||
private_settings_t *this, char *key, u_int32_t value, ...)
|
||||
private_settings_t *this, char *key, uint32_t value, ...)
|
||||
{
|
||||
char val[16];
|
||||
va_list args;
|
||||
|
||||
@@ -51,13 +51,13 @@ bool settings_value_as_bool(char *value, bool def);
|
||||
int settings_value_as_int(char *value, int def);
|
||||
|
||||
/**
|
||||
* Convert a string value returned by a key/value enumerator to an u_int64_t.
|
||||
* Convert a string value returned by a key/value enumerator to an uint64_t.
|
||||
*
|
||||
* @see settings_t.create_key_value_enumerator()
|
||||
* @param value the string value
|
||||
* @param def the default value, if value is NULL or invalid
|
||||
*/
|
||||
u_int64_t settings_value_as_uint64(char *value, u_int64_t def);
|
||||
uint64_t settings_value_as_uint64(char *value, uint64_t def);
|
||||
|
||||
/**
|
||||
* Convert a string value returned by a key/value enumerator to a double.
|
||||
@@ -77,7 +77,7 @@ double settings_value_as_double(char *value, double def);
|
||||
* @param value the string value
|
||||
* @param def the default value, if value is NULL or invalid
|
||||
*/
|
||||
u_int32_t settings_value_as_time(char *value, u_int32_t def);
|
||||
uint32_t settings_value_as_time(char *value, uint32_t def);
|
||||
|
||||
/**
|
||||
* Generic configuration options read from a config file.
|
||||
@@ -203,7 +203,7 @@ struct settings_t {
|
||||
* @param ... argument list for key
|
||||
* @return value of the key (in seconds)
|
||||
*/
|
||||
u_int32_t (*get_time)(settings_t *this, char *key, u_int32_t def, ...);
|
||||
uint32_t (*get_time)(settings_t *this, char *key, uint32_t def, ...);
|
||||
|
||||
/**
|
||||
* Set a string value.
|
||||
@@ -248,7 +248,7 @@ struct settings_t {
|
||||
* @param def value to set
|
||||
* @param ... argument list for key
|
||||
*/
|
||||
void (*set_time)(settings_t *this, char *key, u_int32_t value, ...);
|
||||
void (*set_time)(settings_t *this, char *key, uint32_t value, ...);
|
||||
|
||||
/**
|
||||
* Set a default for string value.
|
||||
|
||||
Reference in New Issue
Block a user