git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recast more internal string routines to use growable-strings
[exim.git]
/
src
/
src
/
acl.c
diff --git
a/src/src/acl.c
b/src/src/acl.c
index 6cce0aae66b74c986c9cb01e37144f2747abca25..f3b860e4af33eedb3dcf3f8e8a29f2e1939e3c14 100644
(file)
--- a/
src/src/acl.c
+++ b/
src/src/acl.c
@@
-2165,8
+2165,6
@@
Arguments:
log_msgptr for error messages
format format string
... supplementary arguments
log_msgptr for error messages
format format string
... supplementary arguments
- ss ratelimit option name
- where ACL_WHERE_xxxx indicating which ACL this is
Returns: ERROR
*/
Returns: ERROR
*/
@@
-2175,14
+2173,15
@@
static int
ratelimit_error(uschar **log_msgptr, const char *format, ...)
{
va_list ap;
ratelimit_error(uschar **log_msgptr, const char *format, ...)
{
va_list ap;
-uschar buffer[STRING_SPRINTF_BUFFER_SIZE];
+gstring * g =
+ string_cat(NULL, US"error in arguments to \"ratelimit\" condition: ");
+
va_start(ap, format);
va_start(ap, format);
-if (!string_vformat(buffer, sizeof(buffer), format, ap))
- log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "string_sprintf expansion was longer than " SIZE_T_FMT, sizeof(buffer));
+g = string_vformat(g, TRUE, format, ap);
va_end(ap);
va_end(ap);
-*log_msgptr = string_sprintf(
- "error in arguments to \"ratelimit\" condition: %s", buffer);
+
+gstring_reset_unused(g);
+*log_msgptr = string_from_gstring(g);
return ERROR;
}
return ERROR;
}
@@
-3566,7
+3565,6
@@
for (; cb; cb = cb->next)
}
while (isspace(*s)) s++;
}
while (isspace(*s)) s++;
-
if (logbits == 0) logbits = LOG_MAIN;
log_write(0, logbits, "%s", string_printing(s));
}
if (logbits == 0) logbits = LOG_MAIN;
log_write(0, logbits, "%s", string_printing(s));
}