mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
silence compiler punned warning (adjust signed/unsigned chars).
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Id: ns_name.c,v 1.8 2004/03/09 06:30:09 marka Exp $";
|
static const char rcsid[] = "$Id: ns_name.c,v 1.9 2004/05/04 03:28:31 marka Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "port_before.h"
|
#include "port_before.h"
|
||||||
@@ -75,9 +75,11 @@ static int dn_find(const u_char *, const u_char *,
|
|||||||
const u_char * const *,
|
const u_char * const *,
|
||||||
const u_char * const *);
|
const u_char * const *);
|
||||||
static int encode_bitsring(const char **, const char *,
|
static int encode_bitsring(const char **, const char *,
|
||||||
char **, char **, const char *);
|
unsigned char **, unsigned char **,
|
||||||
|
unsigned const char *);
|
||||||
static int labellen(const u_char *);
|
static int labellen(const u_char *);
|
||||||
static int decode_bitstring(const char **, char *, const char *);
|
static int decode_bitstring(const unsigned char **,
|
||||||
|
char *, const char *);
|
||||||
|
|
||||||
/* Public. */
|
/* Public. */
|
||||||
|
|
||||||
@@ -132,7 +134,7 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
if ((m = decode_bitstring((const char **)&cp, dn, eom)) < 0)
|
if ((m = decode_bitstring(&cp, dn, eom)) < 0)
|
||||||
{
|
{
|
||||||
errno = EMSGSIZE;
|
errno = EMSGSIZE;
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -212,11 +214,8 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz)
|
|||||||
errno = EINVAL; /* ??? */
|
errno = EINVAL; /* ??? */
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
if ((e = encode_bitsring(&src,
|
if ((e = encode_bitsring(&src, cp + 2,
|
||||||
cp + 2,
|
&label, &bp, eom))
|
||||||
(char **)&label,
|
|
||||||
(char **)&bp,
|
|
||||||
(const char *)eom))
|
|
||||||
!= 0) {
|
!= 0) {
|
||||||
errno = e;
|
errno = e;
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -788,9 +787,9 @@ dn_find(const u_char *domain, const u_char *msg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decode_bitstring(const char **cpp, char *dn, const char *eom)
|
decode_bitstring(const unsigned char **cpp, char *dn, const char *eom)
|
||||||
{
|
{
|
||||||
const char *cp = *cpp;
|
const unsigned char *cp = *cpp;
|
||||||
char *beg = dn, tc;
|
char *beg = dn, tc;
|
||||||
int b, blen, plen, i;
|
int b, blen, plen, i;
|
||||||
|
|
||||||
@@ -836,12 +835,13 @@ decode_bitstring(const char **cpp, char *dn, const char *eom)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
encode_bitsring(const char **bp, const char *end, char **labelp,
|
encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
|
||||||
char ** dst, const char *eom)
|
unsigned char ** dst, unsigned const char *eom)
|
||||||
{
|
{
|
||||||
int afterslash = 0;
|
int afterslash = 0;
|
||||||
const char *cp = *bp;
|
const char *cp = *bp;
|
||||||
char *tp, c;
|
unsigned char *tp;
|
||||||
|
char c;
|
||||||
const char *beg_blen;
|
const char *beg_blen;
|
||||||
char *end_blen = NULL;
|
char *end_blen = NULL;
|
||||||
int value = 0, count = 0, tbcount = 0, blen = 0;
|
int value = 0, count = 0, tbcount = 0, blen = 0;
|
||||||
|
Reference in New Issue
Block a user