check whether the file even exists
1 files changed, 2 insertions(+), 0 deletions(-) M main.c
M main.c => main.c +2 -0
@@ 60,6 60,8 @@ main(int argc, char **argv) fd = open(*argv, OREAD); else if(argc != 0) usage(); + if(fd < 0) + sysfatal("%r"); if(Binits(&f, fd, OREAD, inbuf, Inbufsz) != 0) sysfatal("%r");