#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.110 2006/06/01 20:23:17 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.111 2006/06/05 16:42:58 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
default:
parse_warn(cfile, "invalid code width (%d), "
"expecting a 1, 2 or 4.",
- val);
+ tsize);
goto bad;
}
break;
lsize = atoi(val);
if (lsize != 1 && lsize != 2) {
parse_warn(cfile, "invalid length width (%d) "
- "expecting 1 or 2.", val);
+ "expecting 1 or 2.", lsize);
goto bad;
}
int parse_option_decl PROTO ((struct option_cache **, struct parse *));
void parse_string_list PROTO ((struct parse *, struct string_list **, int));
int parse_ip_addr PROTO ((struct parse *, struct iaddr *));
+int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
void parse_reject_statement PROTO ((struct parse *, struct client_config *));
/* dhcrelay.c */
hashed_object_t *value;
};
-typedef int (*hash_comparator_t)(const void *, const void *, unsigned long);
+typedef int (*hash_comparator_t)(const void *, const void *, size_t);
struct hash_table {
unsigned hash_count;
int hash_lookup (hashed_object_t **, struct hash_table *,
const void *, unsigned, const char *, int);
int hash_foreach (struct hash_table *, hash_foreach_func);
-int casecmp (const void *s, const void *t, unsigned long len);
+int casecmp (const void *s, const void *t, size_t len);
#endif /* OMAPI_HASH_H */
#ifndef lint
static char copyright[] =
-"$Id: hash.c,v 1.8 2006/06/01 20:23:17 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: hash.c,v 1.9 2006/06/05 16:42:59 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
return 4;
log_fatal("Impossible condition at %s:%d.", MDL);
+ return 0; /* Silence compiler warnings. */
}
int new_hash_table (tp, count, file, line)
return count;
}
-int casecmp (const void *v1, const void *v2, unsigned long len)
+int casecmp (const void *v1, const void *v2, size_t len)
{
- unsigned i;
+ size_t i;
const char *s = v1;
const char *t = v2;
for (i = 0; i < len; i++)
{
int c1, c2;
- if (isascii (s [i]) && isupper (s [i]))
- c1 = tolower (s [i]);
+ if (isascii(s[i]))
+ c1 = tolower(s[i]);
else
- c1 = s [i];
-
- if (isascii (t [i]) && isupper (t [i]))
- c2 = tolower (t [i]);
+ c1 = s[i];
+
+ if (isascii(t[i]))
+ c2 = tolower(t[i]);
else
- c2 = t [i];
-
+ c2 = t[i];
+
if (c1 < c2)
return -1;
if (c1 > c2)