fopen(TTY...) to bb_xfopen(), close bug 600
author"Vladimir N. Oleynik" <dzo@simtreas.ru>
Thu, 15 Dec 2005 11:53:22 +0000 (11:53 -0000)
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>
Thu, 15 Dec 2005 11:53:22 +0000 (11:53 -0000)
miscutils/less.c

index 189b886f712c5480e35516db3d4f0014c16936e4..0b0dc0c8bbd7244915a8eda90a81001b0f95c662 100644 (file)
@@ -238,7 +238,7 @@ static void data_readlines(void) {
        fclose(fp);
 
        if(inp == NULL)
-               inp = (inp_stdin) ? fopen(CURRENT_TTY, "r") : stdin;
+               inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin;
 
        if (flags & FLAG_N)
                add_linenumbers();