aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorpowwow@askgustav.com <powwow@askgustav.com>2020-05-23 09:29:22 (GMT)
committerpowwow@askgustav.com <powwow@askgustav.com>2020-05-23 09:29:22 (GMT)
commit27595ac18f2c19e4cbfabb4fe2638e72366fd6cb (patch)
treed40d673421f2b069078d187ea8df8e644c1f079d /src/log.c
parentdf019a5895f7dd2d895c9a08503ce15965196e91 (diff)
downloadpowwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.zip
powwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.tar.gz
powwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.tar.bz2
minor beautifications
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/log.c b/src/log.c
index 32237b8..d4f427e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -159,7 +159,7 @@ void log_resize(int newsize)
/*
* add a single line to the buffer
*/
-static void log_writeline(char *line, int len, int kind, long msecs)
+static void log_writeline(const char *line, int len, int kind, long msecs)
{
int dst;
@@ -193,7 +193,7 @@ static void log_writeline(char *line, int len, int kind, long msecs)
/*
* write to #capture / #movie buffer
*/
-void log_write(char *str, int len, int newline)
+void log_write(const char *str, int len, int newline)
{
char *next;
long diff;
@@ -228,8 +228,7 @@ void log_write(char *str, int len, int newline)
if (capturefile) {
fwrite(str, 1, i, capturefile);
if (newline) {
- const char nl[1] = "\n";
- fwrite(nl, 1, 1, capturefile);
+ fputc('\n', capturefile);
newline = 0;
}
}