From 74a1be3402cdf41e683eb2ad6e6967a9a09269fd Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 10 Jul 2000 09:14:15 +0000 Subject: Don't call err() with no format string. --- usr.bin/indent/indent.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.bin/indent/indent.c') 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); } } -- cgit v1.1