Do not strncpy() strings returned by gettext()

Translated strings returned by gettext() are statically allocated.
There's no need to copy them to a buffer, we can use the pointers
returned by gettext() instead.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-03-02 09:28:13 +01:00
parent 0f4b45e624
commit 481cb5524f
6 changed files with 20 additions and 26 deletions

View File

@@ -168,7 +168,7 @@ help_wins_init (struct scrollwin *hwin, int x, int y, int h, int w)
hwin->pad.h = BUFSIZ;
hwin->pad.w = hwin->win.w - 2 * PADOFFSET + 1;
strncpy (hwin->label, _("Calcurse help"), BUFSIZ);
hwin->label = _("Calcurse help");
wins_scrollwin_init (hwin);
wins_show (hwin->win.p, hwin->label);
}