remove redundant long int
Using unsigned long is sufficient no need to be more verbose and use unsigned long int. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
378dd31b4b
commit
3a1f602ade
|
|
@ -66,9 +66,9 @@ _PRINT_FUNC(uint, unsigned int);
|
|||
_PRINT_FUNC(u64, uint64_t);
|
||||
_PRINT_FUNC(hu, unsigned short);
|
||||
_PRINT_FUNC(hex, unsigned int);
|
||||
_PRINT_FUNC(0xhex, unsigned long long int);
|
||||
_PRINT_FUNC(luint, unsigned long int);
|
||||
_PRINT_FUNC(lluint, unsigned long long int);
|
||||
_PRINT_FUNC(0xhex, unsigned long long);
|
||||
_PRINT_FUNC(luint, unsigned long);
|
||||
_PRINT_FUNC(lluint, unsigned long long);
|
||||
_PRINT_FUNC(float, double);
|
||||
#undef _PRINT_FUNC
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ void jsonw_hu(json_writer_t *self, unsigned short number);
|
|||
void jsonw_int(json_writer_t *self, int number);
|
||||
void jsonw_s64(json_writer_t *self, int64_t number);
|
||||
void jsonw_null(json_writer_t *self);
|
||||
void jsonw_luint(json_writer_t *self, unsigned long int num);
|
||||
void jsonw_lluint(json_writer_t *self, unsigned long long int num);
|
||||
void jsonw_luint(json_writer_t *self, unsigned long num);
|
||||
void jsonw_lluint(json_writer_t *self, unsigned long long num);
|
||||
|
||||
/* Useful Combinations of name and value */
|
||||
void jsonw_string_field(json_writer_t *self, const char *prop, const char *val);
|
||||
|
|
@ -57,9 +57,9 @@ void jsonw_int_field(json_writer_t *self, const char *prop, int num);
|
|||
void jsonw_s64_field(json_writer_t *self, const char *prop, int64_t num);
|
||||
void jsonw_null_field(json_writer_t *self, const char *prop);
|
||||
void jsonw_luint_field(json_writer_t *self, const char *prop,
|
||||
unsigned long int num);
|
||||
unsigned long num);
|
||||
void jsonw_lluint_field(json_writer_t *self, const char *prop,
|
||||
unsigned long long int num);
|
||||
unsigned long long num);
|
||||
|
||||
/* Collections */
|
||||
void jsonw_start_object(json_writer_t *self);
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ _PRINT_FUNC(s64, int64_t);
|
|||
_PRINT_FUNC(hu, unsigned short);
|
||||
_PRINT_FUNC(uint, unsigned int);
|
||||
_PRINT_FUNC(u64, uint64_t);
|
||||
_PRINT_FUNC(luint, unsigned long int);
|
||||
_PRINT_FUNC(lluint, unsigned long long int);
|
||||
_PRINT_FUNC(luint, unsigned long);
|
||||
_PRINT_FUNC(lluint, unsigned long long);
|
||||
_PRINT_FUNC(float, double);
|
||||
#undef _PRINT_FUNC
|
||||
|
||||
|
|
|
|||
|
|
@ -231,12 +231,12 @@ void jsonw_xint(json_writer_t *self, uint64_t num)
|
|||
jsonw_printf(self, "%"PRIx64, num);
|
||||
}
|
||||
|
||||
void jsonw_luint(json_writer_t *self, unsigned long int num)
|
||||
void jsonw_luint(json_writer_t *self, unsigned long num)
|
||||
{
|
||||
jsonw_printf(self, "%lu", num);
|
||||
}
|
||||
|
||||
void jsonw_lluint(json_writer_t *self, unsigned long long int num)
|
||||
void jsonw_lluint(json_writer_t *self, unsigned long long num)
|
||||
{
|
||||
jsonw_printf(self, "%llu", num);
|
||||
}
|
||||
|
|
@ -296,7 +296,7 @@ void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num)
|
|||
|
||||
void jsonw_luint_field(json_writer_t *self,
|
||||
const char *prop,
|
||||
unsigned long int num)
|
||||
unsigned long num)
|
||||
{
|
||||
jsonw_name(self, prop);
|
||||
jsonw_luint(self, num);
|
||||
|
|
@ -304,7 +304,7 @@ void jsonw_luint_field(json_writer_t *self,
|
|||
|
||||
void jsonw_lluint_field(json_writer_t *self,
|
||||
const char *prop,
|
||||
unsigned long long int num)
|
||||
unsigned long long num)
|
||||
{
|
||||
jsonw_name(self, prop);
|
||||
jsonw_lluint(self, num);
|
||||
|
|
|
|||
|
|
@ -1478,7 +1478,7 @@ char *int_to_str(int val, char *buf)
|
|||
|
||||
int get_guid(__u64 *guid, const char *arg)
|
||||
{
|
||||
unsigned long int tmp;
|
||||
unsigned long tmp;
|
||||
char *endptr;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue