patch 8.0.0848: using multiple ch_log functions is clumsy
Problem: Using multiple ch_log functions is clumsy.
Solution: Use variable arguments. (Ozaki Kiichi, closes #1919)
diff --git a/src/message.c b/src/message.c
index 9320d11..4273f23 100644
--- a/src/message.c
+++ b/src/message.c
@@ -171,10 +171,8 @@
#ifdef FEAT_JOB_CHANNEL
if (emsg_to_channel_log)
- {
/* Write message in the channel log. */
- ch_logs(NULL, "ERROR: %s", (char *)s);
- }
+ ch_log(NULL, "ERROR: %s", (char *)s);
#endif
/* When displaying keep_msg, don't let msg_start() free it, caller must do
@@ -667,7 +665,7 @@
redir_write(s, -1);
}
#ifdef FEAT_JOB_CHANNEL
- ch_logs(NULL, "ERROR: %s", (char *)s);
+ ch_log(NULL, "ERROR: %s", (char *)s);
#endif
return TRUE;
}
@@ -5145,7 +5143,7 @@
{
if (str_l < str_m)
{
- size_t avail = str_m-str_l;
+ size_t avail = str_m - str_l;
vim_memset(str + str_l, '0',
(size_t)zn > avail ? avail