X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fditto.c;h=fdc8611aaf6d3862dd47cc9d56352889ccb2d6eb;hp=aecd342ca8334681c34637448595f8cb05ae870d;hb=493e2f7b3fc309879f561a094fdfc15e5304b3d6;hpb=5a107d6f2a641ef5a33c8976fbd6cd26a3196a0d diff --git a/test/ditto.c b/test/ditto.c index aecd342c..fdc8611a 100644 --- a/test/ditto.c +++ b/test/ditto.c @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey (1998-on) * - * $Id: ditto.c,v 1.51 2021/04/17 17:39:43 tom Exp $ + * $Id: ditto.c,v 1.52 2021/08/15 20:07:11 tom Exp $ * * The program illustrates how to set up multiple screens from a single * program. @@ -182,7 +182,7 @@ open_tty(char *path) #else struct stat sb; - if (stat(path, &sb) < 0) + if (stat(path, &sb) == -1) failed(path); if ((sb.st_mode & S_IFMT) != S_IFCHR) { errno = ENOTTY;