summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-04-10 16:51:16 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-04-10 17:17:19 +0100
commit93a680e4c9c899d86ff3fde0933fb5367b34af50 (patch)
tree3356f53b09ffd891b43fbb647b932493f727755e
parent9e716cdf98e2c9e771471249a6b75e7481a54b0b (diff)
tidying: char signedness
-rw-r--r--src/OS/os.c-BSDI6
-rw-r--r--src/src/environment.c13
-rw-r--r--src/src/os.c20
-rw-r--r--src/src/osfunctions.h4
-rw-r--r--src/src/tls.c2
-rw-r--r--src/src/transports/smtp.c14
6 files changed, 30 insertions, 29 deletions
diff --git a/src/OS/os.c-BSDI b/src/OS/os.c-BSDI
index 43e5bb147..03a7a1cef 100644
--- a/src/OS/os.c-BSDI
+++ b/src/OS/os.c-BSDI
@@ -12,8 +12,8 @@ src/os.c file. */
#define OS_UNSETENV
int
-os_unsetenv(const char *name)
+os_unsetenv(const uschar * name)
{
- unsetenv(name);
- return 0;
+unsetenv(CS name);
+return 0;
}
diff --git a/src/src/environment.c b/src/src/environment.c
index b768a0fd6..c394eb7e7 100644
--- a/src/src/environment.c
+++ b/src/src/environment.c
@@ -44,11 +44,12 @@ else if (Ustrcmp(keep_environment, "*") != 0)
/* It's considered broken if we do not find the '=', according to
Florian Weimer. For now we ignore such strings. unsetenv() would complain,
getenv() would complain. */
- uschar *eqp = Ustrchr(*p, '=');
+ uschar * eqp = Ustrchr(*p, '=');
if (eqp)
{
- uschar *name = string_copyn(*p, eqp - *p);
+ uschar * name = string_copyn(*p, eqp - *p);
+
if (OK != match_isinlist(name, CUSS &keep_environment,
0, NULL, NULL, MCL_NOEXPAND, FALSE, NULL))
if (os_unsetenv(name) < 0) return FALSE;
@@ -60,11 +61,11 @@ else if (Ustrcmp(keep_environment, "*") != 0)
}
if (add_environment)
{
- uschar *p;
+ uschar * p;
int sep = 0;
- const uschar* envlist = add_environment;
- while ((p = string_nextinlist(&envlist, &sep, NULL, 0)))
- putenv(CS p);
+ const uschar * envlist = add_environment;
+
+ while ((p = string_nextinlist(&envlist, &sep, NULL, 0))) putenv(CS p);
}
return TRUE;
diff --git a/src/src/os.c b/src/src/os.c
index 689ebfb1b..1cde1b8ec 100644
--- a/src/src/os.c
+++ b/src/src/os.c
@@ -844,9 +844,9 @@ os_get_dns_resolver_res(void)
#if !defined(OS_UNSETENV)
int
-os_unsetenv(const char *name)
+os_unsetenv(const uschar * name)
{
- return unsetenv(name);
+return unsetenv(CS name);
}
#endif
@@ -862,24 +862,24 @@ may not even do this. If the OS supports getcwd(NULL, 0) we'll use
this, for all other systems we provide our own getcwd() */
#if !defined(OS_GETCWD)
-char *
-os_getcwd(char *buffer, size_t size)
+uschar *
+os_getcwd(uschar * buffer, size_t size)
{
-return getcwd(buffer, size);
+return getcwd(CS buffer, size);
}
#else
#ifndef PATH_MAX
# define PATH_MAX 4096
#endif
-char *
-os_getcwd(char *buffer, size_t size)
+uschar *
+os_getcwd(uschar * buffer, size_t size)
{
void *rc;
if (!size) size = PATH_MAX;
-if (!buffer && !(buffer = (char*) malloc(size))) return NULL;
-if (!(buffer = getcwd(buffer, size))) return NULL;
-return realloc(buffer, strlen(buffer) + 1);
+if (!buffer && !(buffer = US malloc(size))) return NULL;
+if (!(buffer = getcwd(CS buffer, size))) return NULL;
+return realloc(CS buffer, strlen(buffer) + 1);
}
#endif
diff --git a/src/src/osfunctions.h b/src/src/osfunctions.h
index a8e87fc3e..4e6e9a91c 100644
--- a/src/src/osfunctions.h
+++ b/src/src/osfunctions.h
@@ -33,10 +33,10 @@ extern const char *os_strexit(int); /* char to match os_strsignal */
extern const char *os_strsignal(int); /* char to match strsignal in some OS */
#endif
#ifndef os_unsetenv
-extern int os_unsetenv(const char *);
+extern int os_unsetenv(const uschar *);
#endif
#ifndef os_getcwd
-extern char* os_getcwd(char *, size_t);
+extern uschar *os_getcwd(uschar *, size_t);
#endif
/* End of osfunctions.h */
diff --git a/src/src/tls.c b/src/src/tls.c
index be9377665..55295108c 100644
--- a/src/src/tls.c
+++ b/src/src/tls.c
@@ -99,7 +99,7 @@ restore_tz(uschar * tz)
if (tz)
(void) setenv("TZ", CCS tz, 1);
else
- (void) os_unsetenv("TZ");
+ (void) os_unsetenv(US"TZ");
tzset();
}
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 6741c01a6..a8a78d945 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -3975,19 +3975,19 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
}
else
{
- const uschar * s;
+ const char * s;
if (hosts_retry == hosts_total)
- s = US"retry time not reached for any host%s";
+ s = "retry time not reached for any host%s";
else if (hosts_fail == hosts_total)
- s = US"all host address lookups%s failed permanently";
+ s = "all host address lookups%s failed permanently";
else if (hosts_defer == hosts_total)
- s = US"all host address lookups%s failed temporarily";
+ s = "all host address lookups%s failed temporarily";
else if (hosts_serial == hosts_total)
- s = US"connection limit reached for all hosts%s";
+ s = "connection limit reached for all hosts%s";
else if (hosts_fail+hosts_defer == hosts_total)
- s = US"all host address lookups%s failed";
+ s = "all host address lookups%s failed";
else
- s = US"some host address lookups failed and retry time "
+ s = "some host address lookups failed and retry time "
"not reached for other hosts or connection limit reached%s";
addr->message = string_sprintf(s,