summaryrefslogtreecommitdiffstats
path: root/lib/src/policy.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2020-02-03 10:38:56 +0000
committerGerrit Code Review <gerrit@fd.io>2020-02-03 10:38:56 +0000
commite90a3ec9cbc98d73dfeb2175ee12edfb56af11ee (patch)
tree77b833e5189847e84933ce3269aaa05ffda24138 /lib/src/policy.c
parentb289a24a07d9fe67e8cd9ea0247987e009df6d50 (diff)
parent55f2219ab98b039f256671c5e584a61ab52bfed0 (diff)
Merge "[HICN-489] Add iOS support to hicn stack"
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);
}