From bc94d42372fd6ef784a2c36db2c595cf18eec62c Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 10 Jan 2010 16:32:49 +0100 Subject: [PATCH] Infobar: Remove useless strncpy. --- src/infobar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/infobar.c b/src/infobar.c index 58e6f01..90e7ce2 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -194,9 +194,6 @@ infobar_draw_statustext(int sc, char *str) lastst = infobar[sc].statustext; infobar[sc].statustext = _strdup(str); - - strncpy(strwb, str, sizeof(strwb)); - len = ((strlen(str) > sizeof(strwc)) ? sizeof(strwc) : strlen(str)); /* Search \b[;;;;#]\ blocks and store properties. */ @@ -218,6 +215,9 @@ infobar_draw_statustext(int sc, char *str) else strwc[j] = strwb[i]; + + printf("%s\n", strwc); + /* Draw a first time the statustext for non colorized text */ draw_text(infobar[sc].bar->dr, (sgeo[sc].width - SHADH) - textw(strwc), FHINFOBAR, infobar[sc].bar->fg, 0, strwc);