summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-31 16:14:04 -0700
committerJeremy Allison <jra@samba.org>2011-06-01 02:54:51 +0200
commit1cee71713f75dbee653ea86bd4e7c87efe677cf6 (patch)
treed55d8051935077eda22d05a4078a7097b27d05ae /source3/client
parent5abab13851ff2fc3a5792d08cc753c9b479c8cc1 (diff)
downloadsamba-1cee71713f75dbee653ea86bd4e7c87efe677cf6.tar.gz
samba-1cee71713f75dbee653ea86bd4e7c87efe677cf6.tar.bz2
samba-1cee71713f75dbee653ea86bd4e7c87efe677cf6.zip
Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).
Part of the efforts to remove PATH_MAX on modern systems.
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 7cffddb76c..f088c7c815 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3876,11 +3876,12 @@ static int cmd_lcd(void)
buf, strerror(errno));
}
}
- d = TALLOC_ARRAY(ctx, char, PATH_MAX+1);
+ d = sys_getwd();
if (!d) {
return 1;
}
- DEBUG(2,("the local directory is now %s\n",sys_getwd(d)));
+ DEBUG(2,("the local directory is now %s\n",d));
+ SAFE_FREE(d);
return 0;
}