diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:13:34 -0400 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-27 15:13:34 -0400 | 
| commit | d7c0a89a3a5697783a6dd89333ab660074790890 (patch) | |
| tree | eefa73e502f919b524b8a345437260d4acc23083 /isisd/isis_misc.c | |
| parent | 28ac5a038101c66e4275a9b1ef6fb37b4f74fb6a (diff) | |
*: use C99 standard fixed-width integer types
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t
Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'isisd/isis_misc.c')
| -rw-r--r-- | isisd/isis_misc.c | 24 | 
1 files changed, 12 insertions, 12 deletions
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 0a1d9aaa1a..c24917454a 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -56,7 +56,7 @@ char nlpidstring[30];  /*   * This converts the isonet to its printable format   */ -const char *isonet_print(const u_char *from, int len) +const char *isonet_print(const uint8_t *from, int len)  {  	int i = 0;  	char *pos = isonet; @@ -87,11 +87,11 @@ const char *isonet_print(const u_char *from, int len)   * Returns 0 on error, length of buff on ok   * extract dot from the dotted str, and insert all the number in a buff   */ -int dotformat2buff(u_char *buff, const char *dotted) +int dotformat2buff(uint8_t *buff, const char *dotted)  {  	int dotlen, len = 0;  	const char *pos = dotted; -	u_char number[3]; +	uint8_t number[3];  	int nextdotpos = 2;  	number[2] = '\0'; @@ -136,11 +136,11 @@ int dotformat2buff(u_char *buff, const char *dotted)  /*   * conversion of XXXX.XXXX.XXXX to memory   */ -int sysid2buff(u_char *buff, const char *dotted) +int sysid2buff(uint8_t *buff, const char *dotted)  {  	int len = 0;  	const char *pos = dotted; -	u_char number[3]; +	uint8_t number[3];  	number[2] = '\0';  	// surely not a sysid_string if not 14 length @@ -304,17 +304,17 @@ const char *syst2string(int type)  /*   * Print functions - we print to static vars   */ -const char *snpa_print(const u_char *from) +const char *snpa_print(const uint8_t *from)  {  	return isis_format_id(from, ISIS_SYS_ID_LEN);  } -const char *sysid_print(const u_char *from) +const char *sysid_print(const uint8_t *from)  {  	return isis_format_id(from, ISIS_SYS_ID_LEN);  } -const char *rawlspid_print(const u_char *from) +const char *rawlspid_print(const uint8_t *from)  {  	return isis_format_id(from, 8);  } @@ -355,10 +355,10 @@ const char *isis_format_id(const uint8_t *id, size_t len)  	return rv;  } -const char *time2string(u_int32_t time) +const char *time2string(uint32_t time)  {  	char *pos = datestring; -	u_int32_t rest; +	uint32_t rest;  	if (time == 0)  		return "-"; @@ -421,7 +421,7 @@ unsigned long isis_jitter(unsigned long timer, unsigned long jitter)  	return timer;  } -struct in_addr newprefix2inaddr(u_char *prefix_start, u_char prefix_masklen) +struct in_addr newprefix2inaddr(uint8_t *prefix_start, uint8_t prefix_masklen)  {  	memset(&new_prefix, 0, sizeof(new_prefix));  	memcpy(&new_prefix, prefix_start, @@ -435,7 +435,7 @@ struct in_addr newprefix2inaddr(u_char *prefix_start, u_char prefix_masklen)   * Returns the dynamic hostname associated with the passed system ID.   * If no dynamic hostname found then returns formatted system ID.   */ -const char *print_sys_hostname(const u_char *sysid) +const char *print_sys_hostname(const uint8_t *sysid)  {  	struct isis_dynhn *dyn;  | 
