summaryrefslogtreecommitdiff
path: root/src/daemontools-extras
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-02-08 22:24:51 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-02-08 22:24:51 +0000
commit49d082377b0614f6cf8503be0699524f936776c0 (patch)
treeb0bfec811816721da9726c7cef9d6a93aabb8362 /src/daemontools-extras
parent502bfd940bfc39fe4eb256d8bd06cc5a15c098d3 (diff)
downloads6-49d082377b0614f6cf8503be0699524f936776c0.tar.xz
- cosmetic fixes in s6-fdholderd
- timestamp length bugfix in s6-log
Diffstat (limited to 'src/daemontools-extras')
-rw-r--r--src/daemontools-extras/s6-log.c6
1 files changed, 3 insertions, 3 deletions
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 :