summaryrefslogtreecommitdiffstats
path: root/lib/src/policy.c
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-01-30 10:44:19 +0100
committerAngelo Mantellini <angelo.mantellini@cisco.com>2020-02-03 10:18:52 +0000
commit55f2219ab98b039f256671c5e584a61ab52bfed0 (patch)
treed97fbf6a57dfdb4335bba979f27bd18f4999c492 /lib/src/policy.c
parentbe54ac541c9700eaa9085bc8b4ee21b7a5f7e30a (diff)
[HICN-489] Add iOS support to hicn stack
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: I8fa8c4eaa3218eb4be46f713b15ab789c6930aa0
Diffstat (limited to 'lib/src/policy.c')
-rw-r--r--lib/src/policy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/src/policy.c b/lib/src/policy.c
index edbb02bea..694f0ea5e 100644
--- a/lib/src/policy.c
+++ b/lib/src/policy.c
@@ -49,13 +49,13 @@ policy_tag_state_snprintf(char * s, size_t size, const policy_tag_state_t * tag_
return -1;
rc = snprintf(cur, s + size - cur, "%s%s", (tag_state->disabled == 1) ? "!" : "", policy_state_str[tag_state->state]);
- if (rc >= s + size - cur)
- return s + size - cur;
+ if (rc >= (int)(s + size - cur))
+ return (int)(s + size - cur);
if (rc < 0)
return rc;
cur += rc;
if (size != 0 && cur >= s + size)
- return cur - s;
+ return (int)(cur - s);
- return cur - s;
+ return (int)(cur - s);
}