summaryrefslogtreecommitdiff
path: root/isisd/isis_misc.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-12-08 01:09:50 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-12-08 01:09:50 +0000
commit41b36e9013111a6da812ca000e3b978282bd27a9 (patch)
tree11805d66de677613be7fe5e31626cfbbbbec78a6 /isisd/isis_misc.c
parent3c0755dc9772deccff2ba6e9dc0511a9af2b9d1b (diff)
[isisd] Fix compiler warnings and allow v4-only compilation
2006-12-08 Hannes Gredler <hannes@gredler.at> * isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument. * isis_pdu.c: (various) Update calls to isis_new_adj() to pass NULL and use default. * (general) Add forward declarations where required. Fix up const char *'s. Allow V4-only compilation.
Diffstat (limited to 'isisd/isis_misc.c')
-rw-r--r--isisd/isis_misc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c
index 384ebe0b..6b565bcb 100644
--- a/isisd/isis_misc.c
+++ b/isisd/isis_misc.c
@@ -99,15 +99,15 @@ isonet_print (u_char * from, int len)
* extract dot from the dotted str, and insert all the number in a buff
*/
int
-dotformat2buff (u_char * buff, u_char * dotted)
+dotformat2buff (u_char * buff, const u_char * dotted)
{
int dotlen, len = 0;
- u_char *pos = dotted;
+ const u_char *pos = dotted;
u_char number[3];
int nextdotpos = 2;
number[2] = '\0';
- dotlen = strlen ((char *)dotted);
+ dotlen = strlen(dotted);
if (dotlen > 50)
{
/* this can't be an iso net, its too long */
@@ -165,7 +165,7 @@ sysid2buff (u_char * buff, const u_char * dotted)
number[2] = '\0';
// surely not a sysid_string if not 14 length
- if (strlen ((char *)dotted) != 14)
+ if (strlen (dotted) != 14)
{
return 0;
}
@@ -271,19 +271,19 @@ speaks (struct nlpids *nlpids, int family)
* Returns 0 on error, IS-IS Circuit Type on ok
*/
int
-string2circuit_t (u_char * str)
+string2circuit_t (const u_char * str)
{
if (!str)
return 0;
- if (!strcmp ((char *)str, "level-1"))
+ if (!strcmp (str, "level-1"))
return IS_LEVEL_1;
- if (!strcmp ((char *)str, "level-2-only") || !strcmp ((char *)str, "level-2"))
+ if (!strcmp (str, "level-2-only") || !strcmp (str, "level-2"))
return IS_LEVEL_2;
- if (!strcmp ((char *)str, "level-1-2"))
+ if (!strcmp (str, "level-1-2"))
return IS_LEVEL_1_AND_2;
return 0;