summaryrefslogtreecommitdiff
path: root/Src/watch.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-08-22 01:55:58 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-08-22 01:55:58 +0200
commit02f6e25bfcd5feb9a093377dda0dd549cdf5c309 (patch)
tree9a25e61122b3fa0d0a1ff68b5ef05c775ff78b1e /Src/watch.c
parente04a19735ffc8523b93b33074f685ad4e2c92e0c (diff)
parent881474edcb223ac22a08d81a824809c33ca3a9c9 (diff)
downloadzsh-02f6e25bfcd5feb9a093377dda0dd549cdf5c309.tar.gz
zsh-02f6e25bfcd5feb9a093377dda0dd549cdf5c309.zip
Merge tag 'zsh-5.0.8-test-2' into debian
Diffstat (limited to 'Src/watch.c')
-rw-r--r--Src/watch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/watch.c b/Src/watch.c
index fe409f91a..c804913ad 100644
--- a/Src/watch.c
+++ b/Src/watch.c
@@ -237,6 +237,7 @@ watchlog2(int inout, WATCH_STRUCT_UTMP *u, char *fmt, int prnt, int fini)
time_t timet;
struct tm *tm;
char *fm2;
+ int len;
# ifdef WATCH_UTMP_UT_HOST
char *p;
int i;
@@ -330,7 +331,9 @@ watchlog2(int inout, WATCH_STRUCT_UTMP *u, char *fmt, int prnt, int fini)
}
timet = getlogtime(u, inout);
tm = localtime(&timet);
- ztrftime(buf, 40, fm2, tm, 0L);
+ len = ztrftime(buf, 40, fm2, tm, 0L);
+ if (len > 0)
+ metafy(buf, len, META_NOALLOC);
printf("%s", (*buf == ' ') ? buf + 1 : buf);
break;
case '%':
@@ -566,7 +569,7 @@ dowatch(void)
return;
}
queue_signals();
- if (!(fmt = getsparam("WATCHFMT")))
+ if (!(fmt = getsparam_u("WATCHFMT")))
fmt = DEFAULT_WATCHFMT;
while ((uct || wct) && !errflag)
if (!uct || (wct && ucmp(uptr, wptr) > 0))