From 75ce6ddea3437b3b784b95f4bcf9b065fa42cdc3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 13 Apr 2011 22:47:04 +0000 Subject: [PATCH] Fix error in strrch() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3501 42af7a65-404d-4744-a932-0658087f49c3 --- nshlib/nsh_envcmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nshlib/nsh_envcmds.c b/nshlib/nsh_envcmds.c index c452668f3..520dd76e7 100644 --- a/nshlib/nsh_envcmds.c +++ b/nshlib/nsh_envcmds.c @@ -240,7 +240,8 @@ int cmd_cd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) /* Set the new workding directory */ - if (chdir(path) != 0) + ret = chdir(path); + if (ret != 0) { nsh_output(vtbl, g_fmtcmdfailed, argv[0], "chdir", NSH_ERRNO); ret = ERROR;