Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
64
Issues
64
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
0880c73c
Commit
0880c73c
authored
Sep 16, 1999
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type cast fixes for Solaris, from Brian Murrell.
parent
0ddb129d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
common/memory.c
common/memory.c
+7
-7
common/nsupdate.c
common/nsupdate.c
+10
-10
No files found.
common/memory.c
View file @
0880c73c
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: memory.c,v 1.5
7 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.5
8 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
;
}
...
...
common/nsupdate.c
View file @
0880c73c
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment