]> granicus.if.org Git - procps-ng/commitdiff
tload: Use standard names instead of numbers.
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:21 +0000 (07:32 +1000)
tload.c

diff --git a/tload.c b/tload.c
index 5fb00506737246e81af15faaee91bd567b89afa3..a45f8c9bfa67f6d4bb40ea7313b407e6ea184e48 100644 (file)
--- a/tload.c
+++ b/tload.c
@@ -49,7 +49,7 @@ static char *screen;
 static int nrows = 25;
 static int ncols = 80;
 static int scr_size;
-static int fd = 1;
+static int fd = STDOUT_FILENO;
 static unsigned int dly = 5;
 static jmp_buf jb;
 
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
                }
 
        if (argc > optind)
-               if ((fd = open(argv[optind], 1)) == -1)
+               if ((fd = open(argv[optind], O_WRONLY)) == -1)
                        xerr(EXIT_FAILURE, _("can not open tty"));
 
        setsize(0);