git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4687a69
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 26 Mar 2024 19:52:49 +0000
(19:52 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 26 Mar 2024 20:01:11 +0000
(20:01 +0000)
14 files changed:
src/exim_monitor/em_log.c
patch
|
blob
|
history
src/src/auths/cram_md5.c
patch
|
blob
|
history
src/src/dbfn.c
patch
|
blob
|
history
src/src/exim_dbmbuild.c
patch
|
blob
|
history
src/src/functions.h
patch
|
blob
|
history
src/src/routers/manualroute.c
patch
|
blob
|
history
src/src/routers/queryprogram.c
patch
|
blob
|
history
src/src/search.c
patch
|
blob
|
history
src/src/smtp_in.c
patch
|
blob
|
history
src/src/smtp_out.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
src/src/tls-openssl.c
patch
|
blob
|
history
src/src/verify.c
patch
|
blob
|
history
src/src/xclient.c
patch
|
blob
|
history
diff --git
a/src/exim_monitor/em_log.c
b/src/exim_monitor/em_log.c
index fbcb6b1c01eed86a0038887fb358df0ec12ff19c..49f649d7e9b745192ad663aad23a19493e58b9e9 100644
(file)
--- a/
src/exim_monitor/em_log.c
+++ b/
src/exim_monitor/em_log.c
@@
-294,7
+294,7
@@
if (LOG != NULL)
if ((p = Ustrstr(buffer, "==")) != NULL)
{
if ((p = Ustrstr(buffer, "==")) != NULL)
{
- queue_item *qq = find_queue(id, queue_noop, 0);
+ queue_item *
qq = find_queue(id, queue_noop, 0);
if (qq)
{
dest_item *d;
if (qq)
{
dest_item *d;
@@
-302,14
+302,12
@@
if (LOG != NULL)
p += 2;
while (isspace(*p)) p++;
q = p;
p += 2;
while (isspace(*p)) p++;
q = p;
- while (*p
!= 0
&& !isspace(*p))
+ while (*p && !isspace(*p))
{
if (*p++ != '\"') continue;
{
if (*p++ != '\"') continue;
- while (*p != 0)
- {
+ while (*p)
if (*p == '\\') p += 2;
if (*p == '\\') p += 2;
- else if (*p++ == '\"') break;
- }
+ else if (*p++ == '\"') break;
}
*p++ = 0;
if ((r = strstric(q, qualify_domain, FALSE)) != NULL &&
}
*p++ = 0;
if ((r = strstric(q, qualify_domain, FALSE)) != NULL &&
diff --git
a/src/src/auths/cram_md5.c
b/src/src/auths/cram_md5.c
index 8f00ee498e00f435fd26a1c436d1cf029bcc46ab..5817be7c93667239d18f28112687e0a57e78d25a 100644
(file)
--- a/
src/src/auths/cram_md5.c
+++ b/
src/src/auths/cram_md5.c
@@
-198,7
+198,7
@@
The former is now the preferred variable; the latter is the original one. Then
check that the remaining length is 32. */
auth_vars[0] = expand_nstring[1] = clear;
check that the remaining length is 32. */
auth_vars[0] = expand_nstring[1] = clear;
-
while (*clear && !isspace(*clear)) clear++
;
+
Uskip_nonwhite(&clear)
;
if (!isspace(*clear)) return FAIL;
*clear++ = 0;
if (!isspace(*clear)) return FAIL;
*clear++ = 0;
diff --git
a/src/src/dbfn.c
b/src/src/dbfn.c
index 13a3c2d66778b1daeb3b4bfe63716e43d38eb9c7..389d1518ed8a0249d6a3f0f75f8a78c941e64426 100644
(file)
--- a/
src/src/dbfn.c
+++ b/
src/src/dbfn.c
@@
-544,8
+544,8
@@
while (Ufgets(buffer, 256, stdin) != NULL)
Uskip_whitespace(&key);
data = key;
Uskip_whitespace(&key);
data = key;
-
while (*data && !isspace((uschar)*data)) data++
;
- *data++ =
0
;
+
Uskip_nonwhite(&data)
;
+ *data++ =
'\0'
;
Uskip_whitespace(&data);
dbwait = (dbdata_wait *)(&structbuffer);
Uskip_whitespace(&data);
dbwait = (dbdata_wait *)(&structbuffer);
diff --git
a/src/src/exim_dbmbuild.c
b/src/src/exim_dbmbuild.c
index 9f5f2f042bc77b4e15aa9b13cdbaf477de25ccf0..bd24faa5b9d4e9e721fa35061e9d1bd3f5bfdc4c 100644
(file)
--- a/
src/src/exim_dbmbuild.c
+++ b/
src/src/exim_dbmbuild.c
@@
-379,7
+379,7
@@
while (Ufgets(line, max_insize, f) != NULL)
else
{
keystart = s;
else
{
keystart = s;
- while (*s
!= 0
&& *s != ':' && !isspace(*s)) s++;
+ while (*s && *s != ':' && !isspace(*s)) s++;
exim_datum_size_set(&key, s - keystart + add_zero);
}
exim_datum_size_set(&key, s - keystart + add_zero);
}
@@
-401,11
+401,11
@@
while (Ufgets(line, max_insize, f) != NULL)
keybuffer[i] = 0;
started = 1;
keybuffer[i] = 0;
started = 1;
- while (isspace(*s))s++;
+ while (isspace(*s))
s++;
if (*s == ':')
{
s++;
if (*s == ':')
{
s++;
- while (isspace(*s))s++;
+ while (isspace(*s))
s++;
}
if (*s != 0)
{
}
if (*s != 0)
{
diff --git
a/src/src/functions.h
b/src/src/functions.h
index 0e657d7c4d784672616ce2f5cc692042172ef239..d811c62a3986b795f9802d5f9b521a3e7839dfcc 100644
(file)
--- a/
src/src/functions.h
+++ b/
src/src/functions.h
@@
-767,6
+767,12
@@
Return the next char as there's enough places using it to be useful. */
static inline uschar skip_whitespace(const uschar ** sp)
{ while (isspace(**sp)) (*sp)++; return **sp; }
static inline uschar skip_whitespace(const uschar ** sp)
{ while (isspace(**sp)) (*sp)++; return **sp; }
+/* Ditto, non-whitespace */
+
+#define Uskip_nonwhite(sp) skip_nonwhite(CUSS sp)
+static inline uschar skip_nonwhite(const uschar ** sp)
+{ while (**sp && !isspace(**sp)) (*sp)++; return **sp; }
+
/******************************************************************************/
/******************************************************************************/
diff --git
a/src/src/routers/manualroute.c
b/src/src/routers/manualroute.c
index ed497336bacfce1b45a709f0ff78965349f8d3d9..ffd6eeaca817b9eb5636cc75d19f2b0b8c297b97 100644
(file)
--- a/
src/src/routers/manualroute.c
+++ b/
src/src/routers/manualroute.c
@@
-335,7
+335,7
@@
while (*options)
unsigned n;
const uschar * s = options;
unsigned n;
const uschar * s = options;
-
while (*options && !isspace(*options)) options++
;
+
Uskip_nonwhite(&options)
;
n = options-s;
if (Ustrncmp(s, "randomize", n) == 0) randomize = TRUE;
n = options-s;
if (Ustrncmp(s, "randomize", n) == 0) randomize = TRUE;
@@
-369,7
+369,7
@@
while (*options)
if (*options)
{
options++;
if (*options)
{
options++;
-
while (*options && isspace(*options)) options++
;
+
Uskip_whitespace(&options)
;
}
}
}
}
diff --git
a/src/src/routers/queryprogram.c
b/src/src/routers/queryprogram.c
index 5f0f50cd956d6e2ffbc2af201ffb5cb98e1161ed..39645cd2306d3759d73b087f3067a84f83cc7515 100644
(file)
--- a/
src/src/routers/queryprogram.c
+++ b/
src/src/routers/queryprogram.c
@@
-365,7
+365,7
@@
DEBUG(D_route) debug_printf("command wrote: %s\n", buffer);
rword = buffer;
Uskip_whitespace(&rword);
rdata = rword;
rword = buffer;
Uskip_whitespace(&rword);
rdata = rword;
-
while (*rdata && !isspace(*rdata)) rdata++
;
+
Uskip_nonwhite(&rdata)
;
if (*rdata) *rdata++ = '\0';
/* The word must be a known yield name. If it is "REDIRECT", the rest of the
if (*rdata) *rdata++ = '\0';
/* The word must be a known yield name. If it is "REDIRECT", the rest of the
diff --git
a/src/src/search.c
b/src/src/search.c
index 168c25e6a028a50c78dd5bd3d50eb8cc43e5ea8d..d0eb84b3bcc66c617cecd416665e4b1657a347b7 100644
(file)
--- a/
src/src/search.c
+++ b/
src/src/search.c
@@
-247,7
+247,7
@@
if (mac_islookup(search_type, lookup_absfilequery))
if (*query == '/')
{
uschar * s = query;
if (*query == '/')
{
uschar * s = query;
-
while (*query && !isspace(*query)) query++
;
+
Uskip_nonwhite(&query)
;
*fnamep = string_copyn(s, query - s);
Uskip_whitespace(&query);
}
*fnamep = string_copyn(s, query - s);
Uskip_whitespace(&query);
}
diff --git
a/src/src/smtp_in.c
b/src/src/smtp_in.c
index 79176687dac1638b8b5fcb85ecde970f3fd59807..70e4b95df2864ec141460eb9a6c7c4e923cddc50 100644
(file)
--- a/
src/src/smtp_in.c
+++ b/
src/src/smtp_in.c
@@
-1946,6
+1946,9
@@
while (done <= 0)
case HELP_CMD:
case NOOP_CMD:
case ETRN_CMD:
case HELP_CMD:
case NOOP_CMD:
case ETRN_CMD:
+#ifdef EXPERIMENTAL_WELLKNOWN
+ case WELLKNOWN_CMD:
+#endif
bsmtp_transaction_linecount = receive_linecount;
break;
bsmtp_transaction_linecount = receive_linecount;
break;
@@
-2991,8
+2994,8
@@
switch (where)
if (where == ACL_WHERE_AUTH) /* avoid logging auth creds */
{
if (where == ACL_WHERE_AUTH) /* avoid logging auth creds */
{
- uschar * s;
-
for (s = smtp_cmd_data; *s && !isspace(*s); ) s++
;
+ uschar * s
= smtp_cmd_data
;
+
Uskip_nonwhite(&s)
;
lim = s - smtp_cmd_data; /* atop after method */
}
what = string_sprintf("%s %.*s", acl_wherenames[where], lim, place);
lim = s - smtp_cmd_data; /* atop after method */
}
what = string_sprintf("%s %.*s", acl_wherenames[where], lim, place);
@@
-5694,7
+5697,7
@@
while (done <= 0)
case TOO_MANY_NONMAIL_CMD:
s = smtp_cmd_buffer;
case TOO_MANY_NONMAIL_CMD:
s = smtp_cmd_buffer;
-
while (*s && !isspace(*s)) s++
;
+
Uskip_nonwhite(&s)
;
incomplete_transaction_log(US"too many non-mail commands");
log_write(0, LOG_MAIN|LOG_REJECT, "SMTP call from %s dropped: too many "
"nonmail commands (last was \"%.*s\")", host_and_ident(FALSE),
incomplete_transaction_log(US"too many non-mail commands");
log_write(0, LOG_MAIN|LOG_REJECT, "SMTP call from %s dropped: too many "
"nonmail commands (last was \"%.*s\")", host_and_ident(FALSE),
diff --git
a/src/src/smtp_out.c
b/src/src/smtp_out.c
index 888a0006e7ae4b227ee2e5148ebfdeadb74c8ae3..a78b15fbd1f719ba81efe2a5a89ddb215de27484 100644
(file)
--- a/
src/src/smtp_out.c
+++ b/
src/src/smtp_out.c
@@
-709,7
+709,7
@@
if (format)
{
p += 5;
Uskip_whitespace(&p);
{
p += 5;
Uskip_whitespace(&p);
-
while (!isspace(*p)) p++
;
+
Uskip_nonwhite(&p)
;
Uskip_whitespace(&p);
}
while (*p) *p++ = '*';
Uskip_whitespace(&p);
}
while (*p) *p++ = '*';
diff --git
a/src/src/string.c
b/src/src/string.c
index af187c1992e13384795091e03946117bc2c2a584..379be2035c6d457d85e14cdb250e836faf0164ec 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-649,7
+649,7
@@
uschar * t, * yield;
/* First find the end of the string */
if (*s != '\"')
/* First find the end of the string */
if (*s != '\"')
-
while (*s && !isspace(*s)) s++
;
+
Uskip_nonwhite(&s)
;
else
{
s++;
else
{
s++;
diff --git
a/src/src/tls-openssl.c
b/src/src/tls-openssl.c
index 64e8c711a402cc0d3c955038737f17054f0efd26..34612adea0974bf7117a057931285f388cf5f8a9 100644
(file)
--- a/
src/src/tls-openssl.c
+++ b/
src/src/tls-openssl.c
@@
-5179,7
+5179,8
@@
for (uschar * s = exp; *s; /**/)
return FALSE;
}
adding = *s++ == '+';
return FALSE;
}
adding = *s++ == '+';
- for (end = s; *end && !isspace(*end); ) end++;
+ end = s;
+ Uskip_nonwhite(&end);
item_parsed = tls_openssl_one_option_parse(string_copyn(s, end-s), &item);
if (!item_parsed)
{
item_parsed = tls_openssl_one_option_parse(string_copyn(s, end-s), &item);
if (!item_parsed)
{
diff --git
a/src/src/verify.c
b/src/src/verify.c
index 4f3bafb04cfd085aca640a76837cee6ff3259a84..065deec41512ee1784ce78bd93f39e73278bfc2e 100644
(file)
--- a/
src/src/verify.c
+++ b/
src/src/verify.c
@@
-3081,7
+3081,7
@@
if (iplookup)
{
filename = semicolon + 1;
key = filename;
{
filename = semicolon + 1;
key = filename;
-
while (*key != 0 && !isspace(*key)) key++
;
+
Uskip_nonwhite(&key)
;
filename = string_copyn(filename, key - filename);
Uskip_whitespace(&key);
}
filename = string_copyn(filename, key - filename);
Uskip_whitespace(&key);
}
diff --git
a/src/src/xclient.c
b/src/src/xclient.c
index 2219cb02732a4e43c65e87444d6444b24b240ecb..fb9d95c5e2260d722356e7798a4b69695cdcd3cf 100644
(file)
--- a/
src/src/xclient.c
+++ b/
src/src/xclient.c
@@
-172,7
+172,7
@@
for (state = XCLIENT_SKIP_SPACES; *s; )
uschar * val;
word = ++s; /* skip the = */
uschar * val;
word = ++s; /* skip the = */
-
while (*s && !isspace(*s)) s++
;
+
Uskip_nonwhite(&s)
;
len = s - word;
DEBUG(D_transport) debug_printf(" XCLIENT: \tvalue %.*s\n", len, word);
len = s - word;
DEBUG(D_transport) debug_printf(" XCLIENT: \tvalue %.*s\n", len, word);