- memset(&s[strlen(s)], ' ', 254 - strlen(s));
- if (cols > strlen(MSG_TITLE) + 2 + strlen(version_string) + 1 + strlen(MSG_TITLESUB))
+ const int titlelen = strlen(s);
+ memset(&s[titlelen], ' ', cols - strlen(MSG_TITLE)); // pad
+ if (cols > titlelen + 1 + strlen(MSG_TITLESUB))