diff src/message.c @ 11937:c893d6c00497 v8.0.0848

patch 8.0.0848: using multiple ch_log functions is clumsy commit https://github.com/vim/vim/commit/2f3a90a3bd8505728c0b6d9ac3515f64ee19b357 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 3 14:49:29 2017 +0200 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 https://github.com/vim/vim/issues/1919)
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Aug 2017 15:00:05 +0200
parents 67cf0d45b006
children 351d94dc8375
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -171,10 +171,8 @@ msg_attr_keep(
 
 #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 @@ emsg(char_u *s)
 		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 @@ vim_vsnprintf_typval(
 		{
 		    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