diff --git a/ed.c b/ed.c index 7e7fbb6..96cfc3b 100644 --- a/ed.c +++ b/ed.c @@ -609,8 +609,8 @@ doread(char *fname) if (fp) fclose(fp); - if (!(fp = fopen(fname, "r"))) - error("input/output error"); + if ((fp = fopen(fname, "r")) == NULL) + error("cannot open input file"); curln = line2; for (cnt = 0; (n = getline(&s, &len, fp)) > 0; cnt += (size_t)n) {