From 481cb5524f8e165bbe3c17bb04bdc7330dd7a923 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 2 Mar 2012 09:28:13 +0100 Subject: 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 --- src/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/help.c') diff --git a/src/help.c b/src/help.c index eaca14b..14d10aa 100644 --- a/src/help.c +++ b/src/help.c @@ -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); } -- cgit v1.2.3-54-g00ecf