Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
f8d63d12
Commit
f8d63d12
authored
Dec 15, 1999
by
Bob Halley
Browse files
Cast to (unsigned char *) in isc_buffer_putstr() because pointer arithmetic
on (void *) is not well defined.
parent
f39add73
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/isc/buffer.c
View file @
f8d63d12
...
...
@@ -400,7 +400,7 @@ isc_buffer_putmem(isc_buffer_t *b, unsigned char *base, unsigned int length)
isc_result_t
isc_buffer_putstr
(
isc_buffer_t
*
b
,
const
char
*
source
)
{
unsigned
int
l
;
isc_region_t
region
;
unsigned
char
*
cp
;
REQUIRE
(
ISC_BUFFER_VALID
(
b
));
REQUIRE
(
source
!=
NULL
);
...
...
@@ -409,8 +409,10 @@ isc_buffer_putstr(isc_buffer_t *b, const char *source) {
if
(
l
>
(
b
->
length
-
b
->
used
))
return
(
ISC_R_NOSPACE
);
memcpy
(
b
->
base
+
b
->
used
,
source
,
l
);
cp
=
(
unsigned
char
*
)
b
->
base
+
b
->
used
;
memcpy
(
cp
,
source
,
l
);
b
->
used
+=
l
;
return
(
ISC_R_SUCCESS
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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