diff options
author | kris <kris@FreeBSD.org> | 2000-07-10 09:14:15 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-07-10 09:14:15 +0000 |
commit | 74a1be3402cdf41e683eb2ad6e6967a9a09269fd (patch) | |
tree | 6194aa20dae4554ce49c6f047f381a9a927655f7 /usr.bin/indent | |
parent | d84b4d3f4d875bdc29e1af239bfea2dadaff8f85 (diff) | |
download | FreeBSD-src-74a1be3402cdf41e683eb2ad6e6967a9a09269fd.zip FreeBSD-src-74a1be3402cdf41e683eb2ad6e6967a9a09269fd.tar.gz |
Don't call err() with no format string.
Diffstat (limited to 'usr.bin/indent')
-rw-r--r-- | usr.bin/indent/indent.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index 02d3444..08977bd 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -189,7 +189,7 @@ main(argc, argv) in_name = argv[i]; /* remember name of input file */ input = fopen(in_name, "r"); if (input == 0) /* check for open error */ - err(1, in_name); + err(1, "%s", in_name); continue; } else if (output == 0) { /* we have the output file */ @@ -200,7 +200,7 @@ main(argc, argv) } output = fopen(out_name, "w"); if (output == 0) /* check for create error */ - err(1, out_name); + err(1, "%s", out_name); continue; } errx(1, "unknown parameter: %s", argv[i]); @@ -1160,23 +1160,23 @@ bakcopy() /* copy in_name to backup file */ bakchn = creat(bakfile, 0600); if (bakchn < 0) - err(1, bakfile); + err(1, "%s", bakfile); while (n = read(fileno(input), buff, sizeof buff)) if (write(bakchn, buff, n) != n) - err(1, bakfile); + err(1, "%s", bakfile); if (n < 0) - err(1, in_name); + err(1, "%s", in_name); close(bakchn); fclose(input); /* re-open backup file as the input file */ input = fopen(bakfile, "r"); if (input == 0) - err(1, bakfile); + err(1, "%s", bakfile); /* now the original input file will be the output */ output = fopen(in_name, "w"); if (output == 0) { unlink(bakfile); - err(1, in_name); + err(1, "%s", in_name); } } |