From: Ted Lemon Date: Thu, 7 Oct 1999 02:14:10 +0000 (+0000) Subject: Fix up char * -> unsigned char * mismatches. X-Git-Tag: BCTEL_SPECIAL_19991124~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77a5f87162dd4b32ee082b87f741793432341cc8;p=thirdparty%2Fdhcp.git Fix up char * -> unsigned char * mismatches. --- diff --git a/common/tree.c b/common/tree.c index 5a9e2931e..8ea29ad8b 100644 --- a/common/tree.c +++ b/common/tree.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: tree.c,v 1.57 1999/10/06 01:35:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: tree.c,v 1.58 1999/10/07 02:14:06 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1338,10 +1338,10 @@ int evaluate_data_expression (result, packet, lease, return 0; } if (data.len == 1 && - !strncasecmp (data.data, "a", 1)) { + !strncasecmp ((char *)data.data, "a", 1)) { s = lease -> ddns_fwd_name; } else if (data.len == 3 && - !strncasecmp (data.data, "ptr", 3)) { + !strncasecmp ((char *)data.data, "ptr", 3)) { s = lease -> ddns_rev_name; } else { #if defined (DEBUG_EXPRESSIONS) diff --git a/server/confpars.c b/server/confpars.c index 50c7bd0d9..222b116a3 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.85 1999/10/01 03:37:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.86 1999/10/07 02:14:09 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1015,7 +1015,8 @@ void parse_host_declaration (cfile, group) } go = ((struct group_object *) hash_lookup (group_name_hash, - val, strlen (val))); + (unsigned char *)val, + strlen (val))); if (!go) { parse_warn (cfile, "unknown group %s in host %s", val, host -> name); @@ -1636,7 +1637,8 @@ void parse_group_declaration (cfile, group) if (group_name_hash) { t = ((struct group_object *) hash_lookup (group_name_hash, - name, strlen (name))); + (unsigned char *)name, + strlen (name))); if (t) { delete_group (t, 0); } diff --git a/server/db.c b/server/db.c index dcc07414f..c7822eb73 100644 --- a/server/db.c +++ b/server/db.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: db.c,v 1.32 1999/10/05 02:44:37 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: db.c,v 1.33 1999/10/07 02:14:10 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -102,7 +102,8 @@ int write_lease (lease) } if (lease -> uid_len) { int i; - if (db_printable_len (lease -> uid, lease -> uid_len)) { + if (db_printable_len ((char *)lease -> uid, + lease -> uid_len)) { fprintf (db_file, "\n\tuid \"%*.*s\";", lease -> uid_len, lease -> uid_len, lease -> uid); @@ -244,7 +245,8 @@ int write_host (host) if (host -> client_identifier.len) { int i; errno = 0; - if (db_printable_len (host -> client_identifier.data, + if (db_printable_len ((char *) + host -> client_identifier.data, host -> client_identifier.len)) { fprintf (db_file, "\n\tuid \"%*.*s\";", host -> client_identifier.len, diff --git a/server/mdb.c b/server/mdb.c index 669393624..401c460b8 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: mdb.c,v 1.6 1999/10/05 18:44:27 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: mdb.c,v 1.7 1999/10/07 02:14:10 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -409,7 +409,8 @@ isc_result_t delete_group (struct group_object *group, int writep) if (group_name_hash) d = ((struct group_object *) hash_lookup (group_name_hash, - group -> name, strlen (group -> name))); + (unsigned char *)group -> name, + strlen (group -> name))); else return ISC_R_INVALIDARG; if (!d) @@ -424,7 +425,8 @@ isc_result_t delete_group (struct group_object *group, int writep) hash table entry. */ if ((group -> flags & GROUP_OBJECT_DYNAMIC) && !(group -> flags & GROUP_OBJECT_STATIC)) { - delete_hash_entry (group_name_hash, group -> name, + delete_hash_entry (group_name_hash, + (unsigned char *)group -> name, strlen (group -> name)); --group -> refcnt; } else { @@ -455,7 +457,7 @@ isc_result_t supersede_group (struct group_object *group, int writep) if (group_name_hash) { t = ((struct group_object *) hash_lookup (group_name_hash, - group -> name, + (unsigned char *)group -> name, strlen (group -> name))); if (t && t != group) { /* If this isn't a dynamic entry, then we need to flag @@ -474,9 +476,10 @@ isc_result_t supersede_group (struct group_object *group, int writep) if (!(t -> flags & GROUP_OBJECT_DELETED)) delete_group (t, 0); else { - delete_hash_entry (group_name_hash, - group -> name, - strlen (group -> name)); + delete_hash_entry + (group_name_hash, + (unsigned char *)group -> name, + strlen (group -> name)); omapi_object_dereference ((omapi_object_t **)&t, "supersede_group"); @@ -492,7 +495,8 @@ isc_result_t supersede_group (struct group_object *group, int writep) dynamic groups if appropriate. */ if (!t) { add_hash (group_name_hash, - group -> name, strlen (group -> name), + (unsigned char *)group -> name, + strlen (group -> name), (unsigned char *)group); } diff --git a/server/omapi.c b/server/omapi.c index 980804101..26e5fa4ee 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -29,7 +29,7 @@ #ifndef lint static char copyright[] = -"$Id: omapi.c,v 1.13 1999/10/06 19:17:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: omapi.c,v 1.14 1999/10/07 02:14:10 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -724,10 +724,11 @@ isc_result_t dhcp_group_destroy (omapi_object_t *h, char *name) if (group_name_hash) { t = ((struct group_object *) hash_lookup (group_name_hash, - group -> name, + (unsigned char *)group -> name, strlen (group -> name))); if (t) { delete_hash_entry (group_name_hash, + (unsigned char *) group -> name, strlen (group -> name)); --group -> refcnt;