summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
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--;