Fix warnings
This commit is contained in:
parent
88afb2a31b
commit
d5362546cf
@ -334,8 +334,8 @@ do { \
|
|||||||
(idx)->prefs = (ps); \
|
(idx)->prefs = (ps); \
|
||||||
(idx)->prefd = (pd); \
|
(idx)->prefd = (pd); \
|
||||||
(idx)->ul_proto = (ulp); \
|
(idx)->ul_proto = (ulp); \
|
||||||
bcopy((s), &(idx)->src, ((struct sockaddr *)(s))->sa_len); \
|
bcopy((s), &(idx)->src, ((const struct sockaddr *)(s))->sa_len); \
|
||||||
bcopy((d), &(idx)->dst, ((struct sockaddr *)(d))->sa_len); \
|
bcopy((d), &(idx)->dst, ((const struct sockaddr *)(d))->sa_len); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -348,8 +348,8 @@ do { \
|
|||||||
(idx)->proto = (p); \
|
(idx)->proto = (p); \
|
||||||
(idx)->mode = (m); \
|
(idx)->mode = (m); \
|
||||||
(idx)->reqid = (r); \
|
(idx)->reqid = (r); \
|
||||||
bcopy((s), &(idx)->src, ((struct sockaddr *)(s))->sa_len); \
|
bcopy((s), &(idx)->src, ((const struct sockaddr *)(s))->sa_len); \
|
||||||
bcopy((d), &(idx)->dst, ((struct sockaddr *)(d))->sa_len); \
|
bcopy((d), &(idx)->dst, ((const struct sockaddr *)(d))->sa_len); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* key statistics */
|
/* key statistics */
|
||||||
@ -7139,7 +7139,7 @@ key_validate_ext(ext, len)
|
|||||||
const struct sadb_ext *ext;
|
const struct sadb_ext *ext;
|
||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
struct sockaddr *sa;
|
const struct sockaddr *sa;
|
||||||
enum { NONE, ADDR } checktype = NONE;
|
enum { NONE, ADDR } checktype = NONE;
|
||||||
int baselen;
|
int baselen;
|
||||||
const int sal = offsetof(struct sockaddr, sa_len) + sizeof(sa->sa_len);
|
const int sal = offsetof(struct sockaddr, sa_len) + sizeof(sa->sa_len);
|
||||||
@ -7166,7 +7166,7 @@ key_validate_ext(ext, len)
|
|||||||
break;
|
break;
|
||||||
case SADB_EXT_IDENTITY_SRC:
|
case SADB_EXT_IDENTITY_SRC:
|
||||||
case SADB_EXT_IDENTITY_DST:
|
case SADB_EXT_IDENTITY_DST:
|
||||||
if (((struct sadb_ident *)ext)->sadb_ident_type ==
|
if (((const struct sadb_ident *)ext)->sadb_ident_type ==
|
||||||
SADB_X_IDENTTYPE_ADDR) {
|
SADB_X_IDENTTYPE_ADDR) {
|
||||||
baselen = PFKEY_ALIGN8(sizeof(struct sadb_ident));
|
baselen = PFKEY_ALIGN8(sizeof(struct sadb_ident));
|
||||||
checktype = ADDR;
|
checktype = ADDR;
|
||||||
@ -7182,7 +7182,7 @@ key_validate_ext(ext, len)
|
|||||||
case NONE:
|
case NONE:
|
||||||
break;
|
break;
|
||||||
case ADDR:
|
case ADDR:
|
||||||
sa = (struct sockaddr *)((caddr_t)ext + baselen);
|
sa = (struct sockaddr *)((uintptr_t)ext + baselen);
|
||||||
if (len < baselen + sal)
|
if (len < baselen + sal)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
if (baselen + PFKEY_ALIGN8(sa->sa_len) != len)
|
if (baselen + PFKEY_ALIGN8(sa->sa_len) != len)
|
||||||
|
@ -579,7 +579,7 @@ extern struct domain keydomain;
|
|||||||
|
|
||||||
struct protosw keysw[] = {
|
struct protosw keysw[] = {
|
||||||
{ SOCK_RAW, &keydomain, PF_KEY_V2, PR_ATOMIC|PR_ADDR,
|
{ SOCK_RAW, &keydomain, PF_KEY_V2, PR_ATOMIC|PR_ADDR,
|
||||||
0, key_output, raw_ctlinput, 0,
|
0, (pr_output_t *)key_output, raw_ctlinput, 0,
|
||||||
0,
|
0,
|
||||||
raw_init, 0, 0, 0,
|
raw_init, 0, 0, 0,
|
||||||
&key_usrreqs
|
&key_usrreqs
|
||||||
|
Loading…
Reference in New Issue
Block a user