match prototype
This commit is contained in:
parent
d8724a3a0d
commit
7f69f4fdb0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61019
@ -67,7 +67,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* open group file */
|
/* open group file */
|
||||||
if ((gf = fopen(gfn, "r")) == NULL)
|
if ((gf = fopen(gfn, "r")) == NULL)
|
||||||
err(EX_IOERR, gfn); /* XXX - is IO_ERR the correct exit code? */
|
err(EX_IOERR, "%s", gfn); /* XXX - is IO_ERR the correct exit code? */
|
||||||
|
|
||||||
/* check line by line */
|
/* check line by line */
|
||||||
while (++n) {
|
while (++n) {
|
||||||
|
@ -131,7 +131,7 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
if (opt_dir) {
|
if (opt_dir) {
|
||||||
if (stat(opt_dir, &sb))
|
if (stat(opt_dir, &sb))
|
||||||
err(2, opt_dir);
|
err(2, "%s", opt_dir);
|
||||||
if (!S_ISDIR(sb.st_mode))
|
if (!S_ISDIR(sb.st_mode))
|
||||||
errx(2, "%s: not a directory", opt_dir);
|
errx(2, "%s: not a directory", opt_dir);
|
||||||
}
|
}
|
||||||
@ -209,9 +209,9 @@ ckdist(const char *path, int type)
|
|||||||
rval = report(path, NULL, E_UNKNOWN);
|
rval = report(path, NULL, E_UNKNOWN);
|
||||||
}
|
}
|
||||||
if (ferror(fp))
|
if (ferror(fp))
|
||||||
warn(path);
|
warn("%s", path);
|
||||||
if (fp != stdin && fclose(fp))
|
if (fp != stdin && fclose(fp))
|
||||||
err(2, path);
|
err(2, "%s", path);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ chkmd5(FILE * fp, const char *path)
|
|||||||
if ((fd = open(dname, O_RDONLY)) == -1)
|
if ((fd = open(dname, O_RDONLY)) == -1)
|
||||||
error = E_ERRNO;
|
error = E_ERRNO;
|
||||||
else if (close(fd))
|
else if (close(fd))
|
||||||
err(2, dname);
|
err(2, "%s", dname);
|
||||||
} else if (!MD5File((char *)dname, chk))
|
} else if (!MD5File((char *)dname, chk))
|
||||||
error = E_ERRNO;
|
error = E_ERRNO;
|
||||||
else if (strcmp(chk, sum))
|
else if (strcmp(chk, sum))
|
||||||
@ -301,7 +301,7 @@ chkinf(FILE * fp, const char *path)
|
|||||||
error = E_CHKSUM;
|
error = E_CHKSUM;
|
||||||
}
|
}
|
||||||
if (fd != -1 && close(fd))
|
if (fd != -1 && close(fd))
|
||||||
err(2, dname);
|
err(2, "%s", dname);
|
||||||
if (opt_ignore && error == E_ERRNO && errno == ENOENT)
|
if (opt_ignore && error == E_ERRNO && errno == ENOENT)
|
||||||
continue;
|
continue;
|
||||||
if (error || (opt_all && cnt >= 0))
|
if (error || (opt_all && cnt >= 0))
|
||||||
|
Loading…
Reference in New Issue
Block a user