summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/nlattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/bpf/nlattr.c')
-rw-r--r--tools/lib/bpf/nlattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c
index f57e77a6e40f..3900d052ed19 100644
--- a/tools/lib/bpf/nlattr.c
+++ b/tools/lib/bpf/nlattr.c
@@ -32,7 +32,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining)
static int nla_ok(const struct nlattr *nla, int remaining)
{
- return remaining >= sizeof(*nla) &&
+ return remaining >= (int)sizeof(*nla) &&
nla->nla_len >= sizeof(*nla) &&
nla->nla_len <= remaining;
}