summaryrefslogtreecommitdiffstats
path: root/lib/netns_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/netns_linux.c')
-rw-r--r--lib/netns_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c
index 4d4376250..98f359401 100644
--- a/lib/netns_linux.c
+++ b/lib/netns_linux.c
@@ -431,7 +431,7 @@ char *ns_netns_pathname(struct vty *vty, const char *name)
/* relevant pathname */
char tmp_name[PATH_MAX];
- snprintf(tmp_name, PATH_MAX, "%s/%s", NS_RUN_DIR, name);
+ snprintf(tmp_name, sizeof(tmp_name), "%s/%s", NS_RUN_DIR, name);
result = realpath(tmp_name, pathname);
}