File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ void write_wtmp(int boot) {
3838
3939 utmp .ut_type = boot ? BOOT_TIME : RUN_LVL ;
4040
41- strncpy (utmp .ut_name , boot ? "reboot" : "shutdown" , sizeof ( utmp .ut_name ) );
42- strncpy (utmp .ut_id , "~~" , sizeof ( utmp .ut_id ) );
43- strncpy (utmp .ut_line , boot ? "~" : "~~" , sizeof ( utmp .ut_line ) );
41+ strncpy (utmp .ut_name , boot ? "reboot" : "shutdown" , sizeof utmp .ut_name );
42+ strncpy (utmp .ut_id , "~~" , sizeof utmp .ut_id );
43+ strncpy (utmp .ut_line , boot ? "~" : "~~" , sizeof utmp .ut_line );
4444 if (uname (& uname_buf ) == 0 )
45- strncpy (utmp .ut_host , uname_buf .release , sizeof ( utmp .ut_host ) );
45+ strncpy (utmp .ut_host , uname_buf .release , sizeof utmp .ut_host );
4646
47- write (fd , (char * )& utmp , sizeof ( utmp ) );
47+ write (fd , (char * )& utmp , sizeof utmp );
4848 close (fd );
4949
5050 if (boot ) {
You can’t perform that action at this time.
0 commit comments