]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/clear_cmd.c
ncurses 6.0 - patch 20171007
[ncurses.git] / progs / clear_cmd.c
index 0e1d85f5deaa8c4611fd211a03e45dec9a7610a3..68a0216485bf2ee912c95d14162eb9a08de7f690 100644 (file)
@@ -37,7 +37,7 @@
 #define USE_LIBTINFO
 #include <clear_cmd.h>
 
-MODULE_ID("$Id: clear_cmd.c,v 1.2 2017/08/19 13:37:24 tom Exp $")
+MODULE_ID("$Id: clear_cmd.c,v 1.3 2017/10/08 00:04:26 tom Exp $")
 
 static int
 putch(int c)
@@ -48,11 +48,9 @@ putch(int c)
 int
 clear_cmd(bool legacy)
 {
-    char *E3;
-
     if (!legacy) {
        /* Clear the scrollback buffer if possible. */
-       E3 = tigetstr("E3");
+       char *E3 = tigetstr("E3");
        if (E3)
            (void) tputs(E3, lines > 0 ? lines : 1, putch);
     }