summaryrefslogtreecommitdiff
path: root/source4/client/client.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 13:27:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:41 -0500
commitdccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch)
tree7c0f8e64f4ded3701818b8968171597eccd62267 /source4/client/client.c
parentffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff)
downloadsamba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/client/client.c')
-rw-r--r--source4/client/client.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index eaa8fe48a0..6a4a9c1040 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -72,7 +72,7 @@ static double dir_total;
/*******************************************************************
Reduce a file name, removing .. elements.
********************************************************************/
-void dos_clean_name(char *s)
+static void dos_clean_name(char *s)
{
char *p=NULL,*r;
@@ -98,7 +98,7 @@ number taken from the buffer. This may not equal the number written.
****************************************************************************/
static int writefile(int f, const void *_b, int n, BOOL translation)
{
- const uint8_t *b = _b;
+ const uint8_t *b = (const uint8_t *)_b;
int i;
if (!translation) {
@@ -126,7 +126,7 @@ static int writefile(int f, const void *_b, int n, BOOL translation)
****************************************************************************/
static int readfile(void *_b, int n, XFILE *f, BOOL translation)
{
- uint8_t *b = _b;
+ uint8_t *b = (uint8_t *)_b;
int i;
int c;
@@ -281,11 +281,11 @@ static int cmd_cd(struct smbclient_context *ctx, const char **args)
}
-BOOL mask_match(struct smbcli_state *c, const char *string, const char *pattern,
- BOOL is_case_sensitive)
+static bool mask_match(struct smbcli_state *c, const char *string,
+ const char *pattern, bool is_case_sensitive)
{
char *p2, *s2;
- BOOL ret;
+ bool ret;
if (ISDOTDOT(string))
string = ".";
@@ -397,7 +397,7 @@ static void init_do_list_queue(void)
{
reset_do_list_queue();
do_list_queue_size = 1024;
- do_list_queue = malloc(do_list_queue_size);
+ do_list_queue = malloc_array_p(char, do_list_queue_size);
if (do_list_queue == 0) {
d_printf("malloc fail for size %d\n",
(int)do_list_queue_size);
@@ -491,7 +491,7 @@ a helper for do_list
****************************************************************************/
static void do_list_helper(struct clilist_file_info *f, const char *mask, void *state)
{
- struct smbclient_context *ctx = state;
+ struct smbclient_context *ctx = (struct smbclient_context *)state;
if (f->attrib & FILE_ATTRIBUTE_DIRECTORY) {
if (do_list_dirs && do_this_one(ctx, f)) {
@@ -2831,7 +2831,7 @@ static char **remote_completion(const char *text, int len)
if (info.count == 2)
info.matches[0] = strdup(info.matches[1]);
else {
- info.matches[0] = malloc(info.samelen+1);
+ info.matches[0] = malloc_array_p(char, info.samelen+1);
if (!info.matches[0])
goto cleanup;
strncpy(info.matches[0], info.matches[1], info.samelen);
@@ -2913,7 +2913,7 @@ static char **completion_fn(const char *text, int start, int end)
matches[0] = strdup(matches[1]);
break;
default:
- matches[0] = malloc(samelen+1);
+ matches[0] = malloc_array_p(char, samelen+1);
if (!matches[0])
goto cleanup;
strncpy(matches[0], matches[1], samelen);