Don't call err() with no format string.
This commit is contained in:
parent
fa5dce6c26
commit
cf6e06f240
@ -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();
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user