mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
Type cast fixes for Solaris, from Brian Murrell.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: memory.c,v 1.57 1999/09/15 19:47:27 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: memory.c,v 1.58 1999/09/16 01:19:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -155,14 +155,14 @@ void enter_host (hd, dynamicp, commit)
|
||||
} else {
|
||||
hp = (struct host_decl *)
|
||||
hash_lookup (host_name_hash,
|
||||
hd -> name,
|
||||
(unsigned char *)hd -> name,
|
||||
strlen (hd -> name));
|
||||
|
||||
/* If there isn't already a host decl matching this
|
||||
address, add it to the hash table. */
|
||||
if (!hp) {
|
||||
add_hash (host_name_hash,
|
||||
hd -> name, strlen (hd -> name),
|
||||
(unsigned char *)hd -> name, strlen (hd -> name),
|
||||
(unsigned char *)hd);
|
||||
hd -> refcnt++; /* XXX */
|
||||
} else
|
||||
@@ -284,14 +284,14 @@ void delete_host (hd, commit)
|
||||
add_hash (host_uid_hash,
|
||||
hd -> n_ipaddr -> client_identifier.data,
|
||||
hd -> n_ipaddr -> client_identifier.len,
|
||||
(char *)hd -> n_ipaddr);
|
||||
(unsigned char *)hd -> n_ipaddr);
|
||||
hd -> n_ipaddr -> refcnt++;
|
||||
}
|
||||
if (hw_head && hd -> n_ipaddr -> interface.hlen) {
|
||||
add_hash (host_hw_addr_hash,
|
||||
hd -> n_ipaddr -> interface.haddr,
|
||||
hd -> n_ipaddr -> interface.hlen,
|
||||
(char *)hd -> n_ipaddr);
|
||||
(unsigned char *)hd -> n_ipaddr);
|
||||
hd -> n_ipaddr -> refcnt++;
|
||||
}
|
||||
omapi_object_dereference ((omapi_object_t **)&hd -> n_ipaddr,
|
||||
@@ -301,12 +301,12 @@ void delete_host (hd, commit)
|
||||
if (host_name_hash) {
|
||||
hp = (struct host_decl *)
|
||||
hash_lookup (host_name_hash,
|
||||
hd -> name, strlen (hd -> name));
|
||||
(unsigned char *)hd -> name, strlen (hd -> name));
|
||||
|
||||
if (hp) {
|
||||
if (hp == hd) {
|
||||
delete_hash_entry (host_name_hash,
|
||||
hd -> name,
|
||||
(unsigned char *)hd -> name,
|
||||
strlen (hd -> name));
|
||||
--hd -> refcnt;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: nsupdate.c,v 1.7 1999/07/31 17:57:36 mellon Exp $ Copyright (c) 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: nsupdate.c,v 1.8 1999/09/16 01:14:52 mellon Exp $ Copyright (c) 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -187,7 +187,7 @@ char *ddns_fwd_name(lease, state, packet)
|
||||
|
||||
static int nsupdateA(hostname, ip_addr, ttl, opcode)
|
||||
char *hostname;
|
||||
char *ip_addr;
|
||||
unsigned char *ip_addr;
|
||||
u_int32_t ttl;
|
||||
int opcode;
|
||||
{
|
||||
@@ -205,7 +205,7 @@ static int nsupdateA(hostname, ip_addr, ttl, opcode)
|
||||
}
|
||||
n->r_opcode = opcode;
|
||||
n->r_data = ip_addr;
|
||||
n->r_size = strlen(n->r_data);
|
||||
n->r_size = strlen((const char *)n->r_data);
|
||||
u->r_next = n;
|
||||
z = res_update(u);
|
||||
log_info("add %s: %s %d IN A %s",
|
||||
@@ -234,7 +234,7 @@ static int nsupdateA(hostname, ip_addr, ttl, opcode)
|
||||
return 0;
|
||||
u->r_opcode = opcode;
|
||||
u->r_data = ip_addr;
|
||||
u->r_size = strlen(u->r_data);
|
||||
u->r_size = strlen((const char *)u->r_data);
|
||||
z = res_update(u);
|
||||
log_info("delete %s: %s %d IN A %s",
|
||||
z == 1 ? "succeeded" : "failed",
|
||||
@@ -246,7 +246,7 @@ static int nsupdateA(hostname, ip_addr, ttl, opcode)
|
||||
}
|
||||
|
||||
static int nsupdatePTR(revname, hostname, ttl, opcode)
|
||||
char *hostname;
|
||||
unsigned char *hostname;
|
||||
char *revname;
|
||||
u_int32_t ttl;
|
||||
int opcode;
|
||||
@@ -260,7 +260,7 @@ static int nsupdatePTR(revname, hostname, ttl, opcode)
|
||||
return 0;
|
||||
u->r_opcode = opcode;
|
||||
u->r_data = hostname;
|
||||
u->r_size = strlen(u->r_data);
|
||||
u->r_size = strlen((const char *)u->r_data);
|
||||
z = res_update(u);
|
||||
log_info("%s %s: %s %d IN PTR %s",
|
||||
opcode == ADD ? "add" :
|
||||
@@ -426,11 +426,11 @@ int updateA(struct data_string *lhs, struct data_string *rhs, unsigned int ttl,
|
||||
static char ipaddr[MAXDNAME];
|
||||
|
||||
hostname[0] = '\0';
|
||||
strncat(hostname, lhs->data, lhs->len);
|
||||
strncat(hostname, (const char *)lhs->data, lhs->len);
|
||||
hostname[lhs->len] = '\0';
|
||||
|
||||
ipaddr[0] = '\0';
|
||||
strncat(ipaddr, rhs->data, rhs->len);
|
||||
strncat(ipaddr, (const char *)rhs->data, rhs->len);
|
||||
ipaddr[rhs->len] = '\0';
|
||||
|
||||
/* delete an existing A if the one to be added is different */
|
||||
@@ -471,11 +471,11 @@ int updatePTR(struct data_string *lhs, struct data_string *rhs,
|
||||
static char revname[MAXDNAME];
|
||||
|
||||
revname[0] = '\0';
|
||||
strncat(revname, lhs->data, lhs->len);
|
||||
strncat(revname, (const char *)lhs->data, lhs->len);
|
||||
revname[lhs->len] = '\0';
|
||||
|
||||
hostname[0] = '\0';
|
||||
strncat(hostname, rhs->data, rhs->len);
|
||||
strncat(hostname, (const char *)rhs->data, rhs->len);
|
||||
hostname[rhs->len] = '\0';
|
||||
|
||||
/* delete an existing PTR if the one to be added is different */
|
||||
|
Reference in New Issue
Block a user