From 1cee71713f75dbee653ea86bd4e7c87efe677cf6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 31 May 2011 16:14:04 -0700 Subject: 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. --- source3/client/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/client/client.c') 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; } -- cgit