summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netgraph/ng_bridge.c4
-rw-r--r--sys/netgraph/ng_one2many.c6
-rw-r--r--sys/netgraph/ng_parse.c8
-rw-r--r--sys/netgraph/ng_ppp.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index 5267d66..1e1ff1c 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -532,7 +532,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
NGI_GET_M(item, m);
/* Get link number */
- linkNum = (int)NG_HOOK_PRIVATE(hook);
+ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS,
("%s: linkNum=%u", __func__, linkNum));
link = priv->links[linkNum];
@@ -791,7 +791,7 @@ ng_bridge_disconnect(hook_p hook)
int linkNum;
/* Get link number */
- linkNum = (int)NG_HOOK_PRIVATE(hook);
+ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS,
("%s: linkNum=%u", __func__, linkNum));
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index bd863e9..5332049 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -238,7 +238,7 @@ ng_one2many_newhook(node_p node, hook_p hook, const char *name)
return (EISCONN);
/* Setup private info for this link */
- NG_HOOK_SET_PRIVATE(hook, (void *)linkNum);
+ NG_HOOK_SET_PRIVATE(hook, (void *)(intptr_t)linkNum);
link->hook = hook;
bzero(&link->stats, sizeof(link->stats));
if (linkNum != NG_ONE2MANY_ONE_LINKNUM) {
@@ -388,7 +388,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
m = NGI_M(item); /* just peaking, mbuf still owned by item */
/* Get link number */
- linkNum = (int)NG_HOOK_PRIVATE(hook);
+ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM
|| (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS),
("%s: linkNum=%d", __func__, linkNum));
@@ -492,7 +492,7 @@ ng_one2many_disconnect(hook_p hook)
int linkNum;
/* Get link number */
- linkNum = (int)NG_HOOK_PRIVATE(hook);
+ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook);
KASSERT(linkNum == NG_ONE2MANY_ONE_LINKNUM
|| (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS),
("%s: linkNum=%d", __func__, linkNum));
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c
index b1d335a5..cff5fcb 100644
--- a/sys/netgraph/ng_parse.c
+++ b/sys/netgraph/ng_parse.c
@@ -362,7 +362,7 @@ ng_int8_unparse(const struct ng_parse_type *type,
int8_t val;
bcopy(data + *off, &val, sizeof(int8_t));
- switch ((int)type->info) {
+ switch ((intptr_t)type->info) {
case INT_SIGNED:
fmt = "%d";
fval = val;
@@ -459,7 +459,7 @@ ng_int16_unparse(const struct ng_parse_type *type,
int16_t val;
bcopy(data + *off, &val, sizeof(int16_t));
- switch ((int)type->info) {
+ switch ((intptr_t)type->info) {
case INT_SIGNED:
fmt = "%d";
fval = val;
@@ -556,7 +556,7 @@ ng_int32_unparse(const struct ng_parse_type *type,
int32_t val;
bcopy(data + *off, &val, sizeof(int32_t));
- switch ((int)type->info) {
+ switch ((intptr_t)type->info) {
case INT_SIGNED:
fmt = "%ld";
fval = val;
@@ -652,7 +652,7 @@ ng_int64_unparse(const struct ng_parse_type *type,
int64_t val;
bcopy(data + *off, &val, sizeof(int64_t));
- switch ((int)type->info) {
+ switch ((intptr_t)type->info) {
case INT_SIGNED:
fmt = "%lld";
fval = val;
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index d723b32..16373e3 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -455,7 +455,7 @@ ng_ppp_newhook(node_p node, hook_p hook, const char *name)
/* OK */
*hookPtr = hook;
- NG_HOOK_SET_PRIVATE(hook, (void *)hookIndex);
+ NG_HOOK_SET_PRIVATE(hook, (void *)(intptr_t)hookIndex);
ng_ppp_update(node, 0);
return (0);
}
@@ -593,7 +593,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item)
{
const node_p node = NG_HOOK_NODE(hook);
const priv_p priv = NG_NODE_PRIVATE(node);
- const int index = (int)NG_HOOK_PRIVATE(hook);
+ const int index = (intptr_t)NG_HOOK_PRIVATE(hook);
u_int16_t linkNum = NG_PPP_BUNDLE_LINKNUM;
hook_p outHook = NULL;
int proto = 0, error;
@@ -826,7 +826,7 @@ ng_ppp_disconnect(hook_p hook)
{
const node_p node = NG_HOOK_NODE(hook);
const priv_p priv = NG_NODE_PRIVATE(node);
- const int index = (int)NG_HOOK_PRIVATE(hook);
+ const int index = (intptr_t)NG_HOOK_PRIVATE(hook);
/* Zero out hook pointer */
if (index < 0)
OpenPOWER on IntegriCloud