summaryrefslogtreecommitdiff
path: root/source4/client
diff options
context:
space:
mode:
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/client.c13
-rw-r--r--source4/client/clitar.c14
2 files changed, 13 insertions, 14 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 823be51285..dce99a7833 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -697,7 +697,7 @@ static int do_get(char *rname, const char *lname, BOOL reget)
GetTimeOfDay(&tp_start);
if (lowercase) {
- strlower(lname);
+ strlower(discard_const_p(char, lname));
}
fnum = smbcli_open(cli->tree, rname, O_RDONLY, DENY_NONE);
@@ -870,9 +870,10 @@ static void do_mget(file_info *finfo)
pstrcat(cur_dir,finfo->name);
pstrcat(cur_dir,"\\");
- string_replace(finfo->name, '\\', '/');
- if (lowercase)
- strlower(finfo->name);
+ string_replace(discard_const_p(char, finfo->name), '\\', '/');
+ if (lowercase) {
+ strlower(discard_const_p(char, finfo->name));
+ }
if (!directory_exist(finfo->name,NULL) &&
mkdir(finfo->name,0777) != 0) {
@@ -2267,7 +2268,7 @@ static BOOL browse_host(const char *query_host)
/****************************************************************************
try and browse available connections on a host
****************************************************************************/
-static BOOL list_servers(char *wk_grp)
+static BOOL list_servers(const char *wk_grp)
{
d_printf("REWRITE: list servers not implemented\n");
return False;
@@ -2636,7 +2637,7 @@ cleanup:
/****************************************************************************
make sure we swallow keepalives during idle time
****************************************************************************/
-static void readline_callback(const char **cmd_ptr)
+static void readline_callback(void)
{
static time_t last_t;
time_t t;
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index 7797b686d5..e10a6b6698 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -40,10 +40,8 @@
/**
Convert list of tokens to array; dependent on above routine.
- Uses last_ptr from above - bit of a hack.
**/
-
-static char **toktocliplist(const char *ptr, int *ctok, const char *sep)
+static char **toktocliplist(char *ptr, int *ctok, const char *sep)
{
char *s = ptr;
int ictok=0;
@@ -168,7 +166,7 @@ static int tarhandle;
static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime,
const char *amode, uint8_t ftype);
-static void do_atar(char *rname,char *lname,file_info *finfo1);
+static void do_atar(char *rname,const char *lname,file_info *finfo1);
static void do_tar(file_info *finfo);
static void oct_it(uint64_t value, int ndgs, char *p);
static void fixtarname(char *tptr, const char *fp, int l);
@@ -641,7 +639,7 @@ static void do_setrattr(char *name, uint16_t attr, int set)
/****************************************************************************
append one remote file to the tar file
***************************************************************************/
-static void do_atar(char *rname,char *lname,file_info *finfo1)
+static void do_atar(char *rname,const char *lname,file_info *finfo1)
{
int fnum;
uint64_t nread=0;
@@ -666,7 +664,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
finfo.mtime = finfo1 -> mtime;
finfo.atime = finfo1 -> atime;
finfo.ctime = finfo1 -> ctime;
- finfo.name = finfo1 -> name;
+ finfo.name = discard_const_p(char, finfo1 -> name);
}
else {
ZERO_STRUCT(finfo);
@@ -1443,13 +1441,13 @@ int cmd_setmode(const char **cmd_ptr)
/****************************************************************************
Principal command for creating / extracting
***************************************************************************/
-int cmd_tar(const char **cmd_ptr)
+int cmd_tar(char **cmd_ptr)
{
fstring buf;
char **argl;
int argcl;
- if (!next_token(cmd_ptr,buf,NULL,sizeof(buf)))
+ if (!next_token((const char **)cmd_ptr,buf,NULL,sizeof(buf)))
{
DEBUG(0,("tar <c|x>[IXbgan] <filename>\n"));
return 1;