Don't call err() with no format string.

This commit is contained in:
Kris Kennaway 2000-07-10 08:42:58 +00:00
parent fa5dce6c26
commit cf6e06f240
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62889
2 changed files with 7 additions and 3 deletions

View file

@ -87,11 +87,11 @@ main(argc, argv)
switch(argv[0][0]) {
case 'n':
if (chmod(name, sb.st_mode & ~0100) < 0)
err(2, name);
err(2, "%s", name);
break;
case 'y':
if (chmod(name, sb.st_mode | 0100) < 0)
err(2, name);
err(2, "%s", name);
break;
default:
usage();

View file

@ -38,7 +38,11 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
#if 0
static const char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <err.h>
@ -104,7 +108,7 @@ main(argc, argv)
close(0);
if (!(f = fopen(argv[0], "r"))) {
fflush(stdout);
err(1, argv[0]);
err(1, "%s", argv[0]);
}
argc--;
argv++;