diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-10 19:32:23 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-14 18:34:18 -0800 |
commit | 008a2b21156a4eac85906d6b4b5e10ca0e4f740f (patch) | |
tree | e52f5c0b7495405cbf403eed4e4d41bc4cc83b0f /listres.c | |
parent | ca962dc8de8af38a641e7fdd4243146817776924 (diff) |
Replace computed printf format string with static string
Allows format string analysis by gcc & other code checkers.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Diffstat (limited to 'listres.c')
-rw-r--r-- | listres.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -150,15 +150,13 @@ static void list_known_widgets (void) int i; XmuWidgetNode *wn; int width = 0; - char format[20]; for (i = 0, wn = widget_list; i < nwidgets; i++, wn++) { int l = strlen (wn->label); if (l > width) width = l; } - sprintf (format, "%%-%ds ", width); for (i = 0, wn = widget_list; i < nwidgets; i++, wn++) { - printf (format, wn->label); + printf ("%-*s ", width, wn->label); print_classname (wn, (XmuWidgetNode *) NULL, 0, False); putchar ('\n'); } |