From b5737df8b9eef8a7001432c1f88a7dcacf2e56a8 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 19 Mar 2010 10:36:22 +0100 Subject: Further warning fixes. --- socket.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'socket.c') diff --git a/socket.c b/socket.c index 061322b9..7bedef38 100644 --- a/socket.c +++ b/socket.c @@ -82,7 +82,8 @@ extern int h_errno; #ifdef HAVE_SOCKETPAIR static char *const *parse_plugin(const char *plugin, const char *host, const char *service) -{ const char **argvec; +{ + char **argvec; const char *c, *p; char *cp, *plugin_copy; unsigned int plugin_copy_len; @@ -129,25 +130,25 @@ static char *const *parse_plugin(const char *plugin, const char *host, const cha } plugin_copy[plugin_copy_len] = 0; - argvec = (const char **)malloc(s); + argvec = (char **)malloc(s); if (!argvec) { report(stderr, GT_("fetchmail: malloc failed\n")); return NULL; } memset(argvec, 0, s); - for (c = p = plugin_copy, i = 0; *c; c++) - { if ((!isspace((unsigned char)*c)) && (c == p ? 1 : isspace((unsigned char)*p))) { - argvec[i] = c; + for (p = cp = plugin_copy, i = 0; *cp; cp++) + { if ((!isspace((unsigned char)*cp)) && (cp == p ? 1 : isspace((unsigned char)*p))) { + argvec[i] = cp; i++; } - p = c; + p = cp; } for (cp = plugin_copy; *cp; cp++) { if (isspace((unsigned char)*cp)) *cp = 0; } - return (char *const*)argvec; + return argvec; } static int handle_plugin(const char *host, -- cgit v1.2.3