+2004-10-07 Hasso Tepper <hasso at quagga.net>
+
+ * connected.c, main.c, rt_netlink.c, rtadv.c, zebra_rib.c, zserv.c:
+ Fix warnings: make strings const, signed -> unsigned.
+
2004-10-05 Paul Jakma <paul@dishone.st>
* irdp_packet.c: (parse_irdp_packet) style issues.
/* Add connected IPv6 route to the interface. */
void
connected_add_ipv6 (struct interface *ifp, struct in6_addr *addr,
- int prefixlen, struct in6_addr *broad)
+ u_char prefixlen, struct in6_addr *broad)
{
struct prefix_ipv6 *p;
struct connected *ifc;
void
connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address,
- int prefixlen, struct in6_addr *broad)
+ u_char prefixlen, struct in6_addr *broad)
{
struct prefix_ipv6 p;
struct connected *ifc;
char config_default[] = SYSCONFDIR DEFAULT_CONFIG_FILE;
/* Process ID saved for use by init system */
-char *pid_file = PATH_ZEBRA_PID;
+const char *pid_file = PATH_ZEBRA_PID;
/* Help information display. */
static void
int sock;
int seq;
struct sockaddr_nl snl;
- char *name;
+ const char *name;
} netlink = { -1, 0, {0}, "netlink-listen"}, /* kernel messages */
netlink_cmd = { -1, 0, {0}, "netlink-cmd"}, /* command channel */
netlink_addr = { -1, 0, {0}, "netlink-addr"}; /* address channel */
{0, NULL}
};
-char *nexthop_types_desc[] =
+const char *nexthop_types_desc[] =
{
"none",
"Directly connected",
}
void
-rtadv_process_packet (u_char *buf, int len, unsigned int ifindex, int hoplimit)
+rtadv_process_packet (u_char *buf, unsigned int len, unsigned int ifindex, int hoplimit)
{
struct icmp6_hdr *icmph;
struct interface *ifp;
return len;
}
- rtadv_process_packet (buf, len, ifindex, hoplimit);
+ rtadv_process_packet (buf, (unsigned)len, ifindex, hoplimit);
return 0;
}
/* Allocate new VRF. */
struct vrf *
-vrf_alloc (char *name)
+vrf_alloc (const char *name)
{
struct vrf *vrf;
struct vrf *
vrf_lookup_by_name (char *name)
{
- int i;
+ unsigned int i;
struct vrf *vrf;
for (i = 0; i < vector_max (vrf_vector); i++)
extern struct zebra_privs_t zserv_privs;
\f
/* For logging of zebra meesages. */
-static char *zebra_command_str [] =
+static const char *zebra_command_str [] =
{
"NULL",
"ZEBRA_INTERFACE_ADD",
else
return -1;
}
- else if (nbytes != length)
+ /* It's clear that nbytes is positive at this point. */
+ else if ((unsigned) nbytes != length)
zebra_server_enqueue (sock, buf, length, nbytes);
return 0;
/* zebra server UNIX domain socket. */
static void
-zebra_serv_un (char *path)
+zebra_serv_un (const char *path)
{
int ret;
int sock, len;