aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-10-09 18:05:47 -0400
committerDave Wallace <dwallacelf@gmail.com>2023-10-09 18:05:47 -0400
commit05cc62dd504bbb0fb230fcf3786ed7f4d5be2364 (patch)
tree1184163325111405772e47c4f0ecffeda5e360cf /src/vppinfra
parent65dc34bb0bdc1045388d2bcd2e93704a97ac6843 (diff)
vppinfra: fix coverity issue CID 323952
Type: fix Fixes: 08600ccfa Change-Id: I53ba0d96507b55ab7cd735073d6c4cf20a3cc948 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/unix-misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c
index 2918fc32328..6a7328bd873 100644
--- a/src/vppinfra/unix-misc.c
+++ b/src/vppinfra/unix-misc.c
@@ -148,11 +148,11 @@ clib_file_get_resolved_basename (char *fmt, ...)
r = readlink ((char *) link, buffer, sizeof (buffer) - 1);
vec_free (link);
- buffer[r] = 0;
if (r < 1)
return 0;
+ buffer[r] = 0;
p = buffer + r - 1;
while (p > buffer && p[-1] != '/')
p--;