diff --git a/src/hello.c b/src/hello.c index 9c27234..d6d2d53 100644 --- a/src/hello.c +++ b/src/hello.c @@ -40,7 +40,7 @@ typedef enum /* Forward declarations. */ static void print_help (void); static void print_version (void); -static void print_box (wchar_t * mb_greeting); +static void print_box (const wchar_t *mb_greeting); static void print_frame (const size_t len); int @@ -133,8 +133,8 @@ main (int argc, char *argv[]) /* New format message in box. */ -void -print_box (wchar_t * greeting) +static void +print_box (const wchar_t *greeting) { wchar_t *ignored; size_t longest_line = 0; @@ -147,7 +147,7 @@ print_box (wchar_t * greeting) }; struct parts *first, *p; - first = xmalloc (sizeof (struct parts)); + first = xmalloc (sizeof *first); first->next = NULL; p = first; @@ -166,7 +166,7 @@ print_box (wchar_t * greeting) p->len = len_tabs - i; if (longest_line < len_tabs) longest_line = len_tabs; - p->next = xmalloc (sizeof (struct parts)); + p->next = xmalloc (sizeof *p->next); p = p->next; p->str = wcstok (NULL, L"\n", &ignored); }