X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Freset_cmd.c;h=09dba5e5bb8bad1a4699c460e94b0c45c408450f;hb=e2e9c09c48b19b24979cafb2d4864f538b5ddd1c;hp=94ad75089e436feb4b149d14f0ba6657cb2d0c0b;hpb=96592d717179f99c8fe1c5a63fc4a26c24867288;p=ncurses.git diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c index 94ad7508..09dba5e5 100644 --- a/progs/reset_cmd.c +++ b/progs/reset_cmd.c @@ -51,7 +51,7 @@ #include #endif -MODULE_ID("$Id: reset_cmd.c,v 1.5 2016/08/06 21:04:54 tom Exp $") +MODULE_ID("$Id: reset_cmd.c,v 1.7 2016/09/10 20:49:10 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -98,7 +98,8 @@ failed(const char *msg) _nc_STRCPY(temp, _nc_progname, sizeof(temp)); _nc_STRCAT(temp, ": ", sizeof(temp)); - perror(strncat(temp, msg, sizeof(temp) - strlen(temp) - 2)); + _nc_STRNCAT(temp, msg, sizeof(temp), sizeof(temp) - strlen(temp) - 2); + perror(temp); exit_error(); /* NOTREACHED */ } @@ -491,6 +492,7 @@ send_init_strings(TTY * old_settings) int i; bool need_flush = FALSE; + (void) old_settings; #ifdef TAB3 if (old_settings != 0 && old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) {