1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Use a better name than underscore-tmpfile for better representation

of the meaning.

Suggested by:	stefanf
This commit is contained in:
Xin LI 2005-01-14 13:18:55 +00:00
parent da089c0f51
commit 665fc054fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140244

View File

@ -402,7 +402,7 @@ buildhints()
int strtab_sz = 0; /* Total length of strings */
int nhints = 0; /* Total number of hints */
int fd;
char *_tmpfile;
char *tmpfilename;
for (shp = shlib_head; shp; shp = shp->next) {
strtab_sz += 1 + strlen(shp->name);
@ -482,10 +482,10 @@ buildhints()
errx(1, "str_index(%d) != strtab_sz(%d)", str_index, strtab_sz);
}
_tmpfile = concat(hints_file, ".XXXXXXXXXX", "");
tmpfilename = concat(hints_file, ".XXXXXXXXXX", "");
umask(0); /* Create with exact permissions */
if ((fd = mkstemp(_tmpfile)) == -1) {
warn("%s", _tmpfile);
if ((fd = mkstemp(tmpfilename)) == -1) {
warn("%s", tmpfilename);
return -1;
}
fchmod(fd, 0444);
@ -515,7 +515,7 @@ buildhints()
return -1;
}
if (rename(_tmpfile, hints_file) != 0) {
if (rename(tmpfilename, hints_file) != 0) {
warn("%s", hints_file);
return -1;
}