aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/facemgr
diff options
context:
space:
mode:
authorMichele Papalini <micpapal@cisco.com>2023-02-02 17:49:46 +0100
committerMichele Papalini <micpapal@cisco.com>2023-02-07 10:25:01 +0100
commit8a7e75e84a31180d51b9970d526709ec4dca2030 (patch)
tree48c1d88f0a5635e75fa9fc0eb898b861b42477e8 /ctrl/facemgr
parentb96d1545a8d2a173dc5911ed0bca3e04dbb02176 (diff)
fix(hicn): fix bugs reported by sonarqube
Ref: HICN-837 Signed-off-by: Michele Papalini <micpapal@cisco.com> Change-Id: I0d02a11361b1ba5ad50123b2dd142c961998922f
Diffstat (limited to 'ctrl/facemgr')
-rw-r--r--ctrl/facemgr/src/facelet.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ctrl/facemgr/src/facelet.c b/ctrl/facemgr/src/facelet.c
index a299cc5ac..4723b8940 100644
--- a/ctrl/facemgr/src/facelet.c
+++ b/ctrl/facemgr/src/facelet.c
@@ -1047,8 +1047,6 @@ int facelet_snprintf(char *s, size_t size, const facelet_t *facelet) {
rc = snprintf(cur, s + size - cur, "}>");
if (rc < 0) return rc;
cur += rc;
- if (cur >= s + size) return (int)(cur - s);
-
return (int)(cur - s);
}
@@ -1222,7 +1220,5 @@ int facelet_snprintf_json(char *s, size_t size, const facelet_t *facelet,
rc = snprintf(cur, s + size - cur, "%*s%s", 4 * indent, "", "}");
if (rc < 0) return rc;
cur += rc;
- if (cur >= s + size) return (int)(cur - s);
-
return (int)(cur - s);
}