/*
* uucp and ftp have special-type entries
*/
- utline[0] = 0;
- strncat(utline, p->ut_line, sizeof(utline) - 1);
+ mem2strcpy(utline, p->ut_line, sizeof(p->ut_line), sizeof(utline));
if (strncmp(utline, "ftp", 3) == 0 && isdigit(utline[3]))
utline[3] = 0;
if (strncmp(utline, "uucp", 4) == 0 && isdigit(utline[4]))
} else if (hours) {
sprintf(length, " (%02d:%02d)", hours, abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */
} else if (secs >= 0) {
- sprintf(length, " (%02d:%02d)", hours, mins);
+ sprintf(length, " (%02d:%02d)", hours, mins);
} else {
sprintf(length, " (-00:%02d)", abs(mins)); /* mins always shown as positive (w/o minus sign!) even if secs < 0 */
}
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- atexit(close_stdout);
+ close_stdout_atexit();
/*
* Which file do we want to read?
*/
usage(&ctl);
break;
case 'V':
- printf(UTIL_LINUX_VERSION);
- return EXIT_SUCCESS;
+ print_version(EXIT_SUCCESS);
case 'R':
ctl.showhost = 0;
break;