diff options
author | Christian Franke <nobody@nowhere.ws> | 2015-11-10 18:04:43 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-03-30 02:26:12 +0200 |
commit | 02e33d3ed5a72d9a64ab68d7440f1e685fc6ca09 (patch) | |
tree | 066074db6946924f9d0d87b0e1fc289a6af690d0 /isisd | |
parent | ripd, isisd: fix warnings that make the build fail (diff) | |
download | frr-02e33d3ed5a72d9a64ab68d7440f1e685fc6ca09.tar.xz frr-02e33d3ed5a72d9a64ab68d7440f1e685fc6ca09.zip |
isisd: annotate some function arguments with const
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_adjacency.c | 8 | ||||
-rw-r--r-- | isisd/isis_adjacency.h | 6 | ||||
-rw-r--r-- | isisd/isis_dynhn.c | 6 | ||||
-rw-r--r-- | isisd/isis_dynhn.h | 6 | ||||
-rw-r--r-- | isisd/isis_misc.c | 10 | ||||
-rw-r--r-- | isisd/isis_misc.h | 10 | ||||
-rw-r--r-- | isisd/isis_pdu.c | 10 |
7 files changed, 28 insertions, 28 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c index fb14a21f0..d492eafa4 100644 --- a/isisd/isis_adjacency.c +++ b/isisd/isis_adjacency.c @@ -52,7 +52,7 @@ extern struct isis *isis; static struct isis_adjacency * -adj_alloc (u_char * id) +adj_alloc (const u_char *id) { struct isis_adjacency *adj; @@ -63,7 +63,7 @@ adj_alloc (u_char * id) } struct isis_adjacency * -isis_new_adj (u_char * id, u_char * snpa, int level, +isis_new_adj (const u_char * id, const u_char * snpa, int level, struct isis_circuit *circuit) { struct isis_adjacency *adj; @@ -104,7 +104,7 @@ isis_new_adj (u_char * id, u_char * snpa, int level, } struct isis_adjacency * -isis_adj_lookup (u_char * sysid, struct list *adjdb) +isis_adj_lookup (const u_char * sysid, struct list *adjdb) { struct isis_adjacency *adj; struct listnode *node; @@ -117,7 +117,7 @@ isis_adj_lookup (u_char * sysid, struct list *adjdb) } struct isis_adjacency * -isis_adj_lookup_snpa (u_char * ssnpa, struct list *adjdb) +isis_adj_lookup_snpa (const u_char * ssnpa, struct list *adjdb) { struct listnode *node; struct isis_adjacency *adj; diff --git a/isisd/isis_adjacency.h b/isisd/isis_adjacency.h index caa3107db..99d0c493b 100644 --- a/isisd/isis_adjacency.h +++ b/isisd/isis_adjacency.h @@ -101,10 +101,10 @@ struct isis_adjacency struct isis_circuit *circuit; /* back pointer */ }; -struct isis_adjacency *isis_adj_lookup (u_char * sysid, struct list *adjdb); -struct isis_adjacency *isis_adj_lookup_snpa (u_char * ssnpa, +struct isis_adjacency *isis_adj_lookup (const u_char * sysid, struct list *adjdb); +struct isis_adjacency *isis_adj_lookup_snpa (const u_char * ssnpa, struct list *adjdb); -struct isis_adjacency *isis_new_adj (u_char * id, u_char * snpa, int level, +struct isis_adjacency *isis_new_adj (const u_char * id, const u_char * snpa, int level, struct isis_circuit *circuit); void isis_delete_adj (void *adj); void isis_adj_state_change (struct isis_adjacency *adj, diff --git a/isisd/isis_dynhn.c b/isisd/isis_dynhn.c index ffb0d503f..412f098a1 100644 --- a/isisd/isis_dynhn.c +++ b/isisd/isis_dynhn.c @@ -78,7 +78,7 @@ dyn_cache_cleanup (struct thread *thread) } struct isis_dynhn * -dynhn_find_by_id (u_char * id) +dynhn_find_by_id (const u_char * id) { struct listnode *node = NULL; struct isis_dynhn *dyn = NULL; @@ -104,7 +104,7 @@ dynhn_find_by_name (const char *hostname) } void -isis_dynhn_insert (u_char * id, struct hostname *hostname, int level) +isis_dynhn_insert (const u_char * id, struct hostname *hostname, int level) { struct isis_dynhn *dyn; @@ -135,7 +135,7 @@ isis_dynhn_insert (u_char * id, struct hostname *hostname, int level) } void -isis_dynhn_remove (u_char * id) +isis_dynhn_remove (const u_char * id) { struct isis_dynhn *dyn; diff --git a/isisd/isis_dynhn.h b/isisd/isis_dynhn.h index 379c454fc..f06a067be 100644 --- a/isisd/isis_dynhn.h +++ b/isisd/isis_dynhn.h @@ -32,9 +32,9 @@ struct isis_dynhn }; void dyn_cache_init (void); -void isis_dynhn_insert (u_char * id, struct hostname *hostname, int level); -void isis_dynhn_remove (u_char * id); -struct isis_dynhn *dynhn_find_by_id (u_char * id); +void isis_dynhn_insert (const u_char * id, struct hostname *hostname, int level); +void isis_dynhn_remove (const u_char * id); +struct isis_dynhn *dynhn_find_by_id (const u_char * id); struct isis_dynhn *dynhn_find_by_name (const char *hostname); void dynhn_print_all (struct vty *vty); diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 968fa05fe..230fe2438 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -63,7 +63,7 @@ char nlpidstring[30]; * This converts the isonet to its printable format */ const char * -isonet_print (u_char * from, int len) +isonet_print (const u_char * from, int len) { int i = 0; char *pos = isonet; @@ -370,7 +370,7 @@ syst2string (int type) * Print functions - we print to static vars */ const char * -snpa_print (u_char * from) +snpa_print (const u_char * from) { int i = 0; u_char *pos = (u_char *)snpa; @@ -402,7 +402,7 @@ snpa_print (u_char * from) } const char * -sysid_print (u_char * from) +sysid_print (const u_char * from) { int i = 0; char *pos = sysid; @@ -434,7 +434,7 @@ sysid_print (u_char * from) } const char * -rawlspid_print (u_char * from) +rawlspid_print (const u_char * from) { char *pos = lspid; if (!from) @@ -553,7 +553,7 @@ unix_hostname (void) * If no dynamic hostname found then returns formatted system ID. */ const char * -print_sys_hostname (u_char *sysid) +print_sys_hostname (const u_char *sysid) { struct isis_dynhn *dyn; diff --git a/isisd/isis_misc.h b/isisd/isis_misc.h index 0cd65a66a..37eaea154 100644 --- a/isisd/isis_misc.h +++ b/isisd/isis_misc.h @@ -41,14 +41,14 @@ int sysid2buff (u_char *, const char *); /* * Printing functions */ -const char *isonet_print (u_char *, int len); -const char *sysid_print (u_char *); -const char *snpa_print (u_char *); -const char *rawlspid_print (u_char *); +const char *isonet_print (const u_char *, int len); +const char *sysid_print (const u_char *); +const char *snpa_print (const u_char *); +const char *rawlspid_print (const u_char *); const char *time2string (u_int32_t); /* typedef struct nlpids nlpids; */ char *nlpid2string (struct nlpids *); -const char *print_sys_hostname (u_char *sysid); +const char *print_sys_hostname (const u_char *sysid); void zlog_dump_data (void *data, int len); /* diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index b47a8646e..2b1d43f3c 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -884,7 +884,7 @@ process_p2p_hello (struct isis_circuit *circuit) * Process IS-IS LAN Level 1/2 Hello PDU */ static int -process_lan_hello (int level, struct isis_circuit *circuit, u_char * ssnpa) +process_lan_hello (int level, struct isis_circuit *circuit, const u_char *ssnpa) { int retval = ISIS_OK; struct isis_lan_hello_hdr hdr; @@ -1272,7 +1272,7 @@ out: * Section 7.3.15.1 - Action on receipt of a link state PDU */ static int -process_lsp (int level, struct isis_circuit *circuit, u_char * ssnpa) +process_lsp (int level, struct isis_circuit *circuit, const u_char *ssnpa) { struct isis_link_state_hdr *hdr; struct isis_adjacency *adj = NULL; @@ -1621,7 +1621,7 @@ dontcheckadj: static int process_snp (int snp_type, int level, struct isis_circuit *circuit, - u_char * ssnpa) + const u_char *ssnpa) { int retval = ISIS_OK; int cmp, own_lsp; @@ -1917,7 +1917,7 @@ process_snp (int snp_type, int level, struct isis_circuit *circuit, } static int -process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa) +process_csnp (int level, struct isis_circuit *circuit, const u_char *ssnpa) { if (isis->debugs & DEBUG_SNP_PACKETS) { @@ -1941,7 +1941,7 @@ process_csnp (int level, struct isis_circuit *circuit, u_char * ssnpa) } static int -process_psnp (int level, struct isis_circuit *circuit, u_char * ssnpa) +process_psnp (int level, struct isis_circuit *circuit, const u_char *ssnpa) { if (isis->debugs & DEBUG_SNP_PACKETS) { |