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 (parent:
e8297f9
)
compiler quietening
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 3 Dec 2022 17:50:17 +0000
(17:50 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 3 Dec 2022 17:50:17 +0000
(17:50 +0000)
src/src/lookups/ldap.c
patch
|
blob
|
history
diff --git
a/src/src/lookups/ldap.c
b/src/src/lookups/ldap.c
index feeea0e412e0a34d9a6e854c633f68609fc3bd4f..ba77c98c25c94d6469b4543350ba697065b45138 100644
(file)
--- a/
src/src/lookups/ldap.c
+++ b/
src/src/lookups/ldap.c
@@
-1470,27
+1470,20
@@
t = quoted = store_get_quoted(len + count + 1, s, idx);
/* Handle plain quote_ldap */
if (!dn)
/* Handle plain quote_ldap */
if (!dn)
- {
- while ((c = *s++))
- {
+ for (; c = *s++; *t++ = c)
if (!isalnum(c))
{
if (Ustrchr(LDAP_QUOTE, c) != NULL)
{
sprintf(CS t, "%%5C%02X", c); /* e.g. * => %5C2A */
t += 5;
if (!isalnum(c))
{
if (Ustrchr(LDAP_QUOTE, c) != NULL)
{
sprintf(CS t, "%%5C%02X", c); /* e.g. * => %5C2A */
t += 5;
- continue;
}
}
- if (Ustrchr(URL_NONQUOTE, c) == NULL) /* e.g. ] => %5D */
+
else
if (Ustrchr(URL_NONQUOTE, c) == NULL) /* e.g. ] => %5D */
{
sprintf(CS t, "%%%02X", c);
t += 3;
{
sprintf(CS t, "%%%02X", c);
t += 3;
- continue;
}
}
}
}
- *t++ = c; /* unquoted character */
- }
- }
/* Handle quote_ldap_dn */
/* Handle quote_ldap_dn */
@@
-1520,8
+1513,8
@@
else
{
if (Ustrchr(LDAP_DN_QUOTE, c) != NULL)
{
{
if (Ustrchr(LDAP_DN_QUOTE, c) != NULL)
{
- Ustr
ncpy(t, US"%5C", 3);
/* insert \ where needed */
- t += 3; /* fall through to check URL */
+ Ustr
cpy(t, US"%5C");
/* insert \ where needed */
+ t += 3;
/* fall through to check URL */
}
if (Ustrchr(URL_NONQUOTE, c) == NULL) /* e.g. ] => %5D */
{
}
if (Ustrchr(URL_NONQUOTE, c) == NULL) /* e.g. ] => %5D */
{
@@
-1535,9
+1528,9
@@
else
/* Handle the trailing spaces */
/* Handle the trailing spaces */
- while (*ss++
!= 0
)
+ while (*ss++)
{
{
- Ustr
ncpy(t, US"%5C%20", 6
);
+ Ustr
cpy(t, US"%5C%20"
);
t += 6;
}
}
t += 6;
}
}