summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
authorSolyn <admin@iloft.xyz>2021-11-16 13:46:14 +0100
committerSolyn <admin@iloft.xyz>2021-11-16 13:46:14 +0100
commit46cba0d45035627532f593a800d815f3a7d71127 (patch)
tree109dfb2546f81c6de831cf053c8ab2381f956ed5 /lib/vty.c
parentMerge pull request #10071 from donaldsharp/valgrind_supp_change (diff)
downloadfrr-46cba0d45035627532f593a800d815f3a7d71127.tar.xz
frr-46cba0d45035627532f593a800d815f3a7d71127.zip
zebra: fix chdir judgment to avoid starting failed in a non-existent directory
Signed-off-by: Solyn <admin@iloft.xyz>
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vty.c b/lib/vty.c
index b702fa785..3df623502 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2998,7 +2998,7 @@ static void vty_save_cwd(void)
* the whole world is coming down around us
* Hence not worrying about it too much.
*/
- if (!chdir(SYSCONFDIR)) {
+ if (chdir(SYSCONFDIR)) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"Failure to chdir to %s, errno: %d",
SYSCONFDIR, errno);