Use errc().

This commit is contained in:
tjr 2004-03-22 09:33:10 +00:00
parent ab3f12c3ce
commit a1bce5d548

View File

@ -235,10 +235,8 @@ newfile(void)
FILE *fp;
if ((size_t)snprintf(currfile, sizeof(currfile), "%s%0*ld", prefix,
(int)sufflen, nfiles) >= sizeof(currfile)) {
errno = ENAMETOOLONG;
err(1, NULL);
}
(int)sufflen, nfiles) >= sizeof(currfile))
errc(1, ENAMETOOLONG, NULL);
if ((fp = fopen(currfile, "w+")) == NULL)
err(1, "%s", currfile);
nfiles++;