From 49d082377b0614f6cf8503be0699524f936776c0 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 8 Feb 2015 22:24:51 +0000 Subject: - cosmetic fixes in s6-fdholderd - timestamp length bugfix in s6-log --- src/daemontools-extras/s6-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/daemontools-extras') diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index d460a90..8a5afc0 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -912,11 +912,11 @@ static void script_run (scriptelem_t const *script, unsigned int scriptlen, char int flagselected = 1, flagacted = 0 ; unsigned int i = 0, hlen = 0 ; char hstamp[32] ; - char tstamp[TIMESTAMP] ; + char tstamp[TIMESTAMP+1] ; if (gflags & 1) { timestamp_g(tstamp) ; - tstamp[TIMESTAMP-1] = ' ' ; + tstamp[TIMESTAMP] = ' ' ; } if (gflags & 2) { @@ -953,7 +953,7 @@ static void script_run (scriptelem_t const *script, unsigned int scriptlen, char for (j = 0 ; j < script[i].actlen ; j++) { act_t const *act = script[i].acts + j ; - siovec_t v[4] = { { .s = tstamp, .len = act->flags & 1 ? TIMESTAMP : 0 }, { .s = hstamp, .len = act->flags & 2 ? hlen : 0 }, { .s = (char *)s, .len = len }, { .s = "\n", .len = 1 } } ; + siovec_t v[4] = { { .s = tstamp, .len = act->flags & 1 ? TIMESTAMP+1 : 0 }, { .s = hstamp, .len = act->flags & 2 ? hlen : 0 }, { .s = (char *)s, .len = len }, { .s = "\n", .len = 1 } } ; switch (act->type) { case ACTTYPE_FD1 : -- cgit v1.2.3