diff options
-rw-r--r-- | checkalias.c | 4 | ||||
-rw-r--r-- | socket.c | 15 | ||||
-rw-r--r-- | transact.c | 4 |
3 files changed, 12 insertions, 11 deletions
diff --git a/checkalias.c b/checkalias.c index 353be44d..2e50ea09 100644 --- a/checkalias.c +++ b/checkalias.c @@ -129,7 +129,7 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res) namelen = strlen(name); for (idl = lead_server->akalist; idl; idl = idl->next) { - char *ep; + const char *ep; /* * Test is >= here because str_in_list() should have caught the @@ -138,7 +138,7 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res) */ if (strlen(idl->id) >= namelen) continue; - ep = (char *)name + (namelen - strlen(idl->id)); + ep = name + (namelen - strlen(idl->id)); /* a suffix led by . must match */ if (ep[-1] == '.' && !strcasecmp(ep, idl->id)) return(TRUE); @@ -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, @@ -43,7 +43,7 @@ int suppress_tags = FALSE; /* emit tags? */ char tag[TAGLEN]; static int tagnum; #define GENSYM (sprintf(tag, "A%04d", ++tagnum % TAGMOD), tag) -static struct method *protocol; +static const struct method *protocol; char shroud[PASSWORDLEN*2+3]; /* string to shroud in debug output */ /* session variables initialized in do_session() */ @@ -1462,7 +1462,7 @@ void init_transact(const struct method *proto) suppress_tags = FALSE; tagnum = 0; tag[0] = '\0'; /* nuke any tag hanging out from previous query */ - protocol = (struct method *)proto; + protocol = proto; shroud[0] = '\0'; } |