2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00

don't use C++ keyword new; use (const char *) for output of strchr((const char *), char)

This commit is contained in:
Mark Andrews
2015-06-18 11:14:43 +10:00
parent f4d1c19691
commit d4422ec231

View File

@@ -314,15 +314,15 @@ name_duporclone(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
static inline void * static inline void *
mem_maybedup(isc_mem_t *mctx, void *source, size_t length) { mem_maybedup(isc_mem_t *mctx, void *source, size_t length) {
void *new; void *copy;
if (mctx == NULL) if (mctx == NULL)
return (source); return (source);
new = isc_mem_allocate(mctx, length); copy = isc_mem_allocate(mctx, length);
if (new != NULL) if (copy != NULL)
memmove(new, source, length); memmove(copy, source, length);
return (new); return (copy);
} }
static const char hexdigits[] = "0123456789abcdef"; static const char hexdigits[] = "0123456789abcdef";
@@ -1578,7 +1578,7 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
static int static int
hexvalue(char value) { hexvalue(char value) {
char *s; const char *s;
unsigned char c; unsigned char c;
c = (unsigned char)value; c = (unsigned char)value;
@@ -1594,7 +1594,7 @@ hexvalue(char value) {
static int static int
decvalue(char value) { decvalue(char value) {
char *s; const char *s;
/* /*
* isascii() is valid for full range of int values, no need to * isascii() is valid for full range of int values, no need to
@@ -1652,7 +1652,7 @@ static isc_result_t byte_btoa(int c, isc_buffer_t *, struct state *state);
*/ */
static isc_result_t static isc_result_t
byte_atob(int c, isc_buffer_t *target, struct state *state) { byte_atob(int c, isc_buffer_t *target, struct state *state) {
char *s; const char *s;
if (c == 'z') { if (c == 'z') {
if (bcount != 0) if (bcount != 0)
return(DNS_R_SYNTAX); return(DNS_R_SYNTAX);