int
ascii2proto(const char *proto_name)
{
- int i;
- for (i = 0; i < SIZE(proto_names); ++i)
+ for (size_t i = 0; i < SIZE(proto_names); ++i)
{
if (!strcmp(proto_name, proto_names[i].short_form))
{
sa_family_t
ascii2af(const char *proto_name)
{
- int i;
- for (i = 0; i < SIZE(proto_names); ++i)
+ for (size_t i = 0; i < SIZE(proto_names); ++i)
{
if (!strcmp(proto_name, proto_names[i].short_form))
{
const char *
proto2ascii(int proto, sa_family_t af, bool display_form)
{
- unsigned int i;
- for (i = 0; i < SIZE(proto_names); ++i)
+ for (size_t i = 0; i < SIZE(proto_names); ++i)
{
if (proto_names[i].proto_af == af && proto_names[i].proto == proto)
{
proto2ascii_all(struct gc_arena *gc)
{
struct buffer out = alloc_buf_gc(256, gc);
- int i;
- for (i = 0; i < SIZE(proto_names); ++i)
+ for (size_t i = 0; i < SIZE(proto_names); ++i)
{
if (i)
{
{
struct gc_arena gc = gc_new();
struct route_gateway_info rgi;
- const int needed = (RGI_ADDR_DEFINED|RGI_NETMASK_DEFINED);
+ const unsigned int needed = (RGI_ADDR_DEFINED|RGI_NETMASK_DEFINED);
get_default_gateway(&rgi, ctx);
if ((rgi.flags & needed) == needed)