tmpfile
FILE *tmpfile(void);
PROTO_NORMAL(tmpfile);
DEF_STRONG(tmpfile);
out = tmpfile();
char tmpfile[1024];
if((size_t)strlen(zfilename) + 16 > sizeof(tmpfile)) {
snprintf(tmpfile, sizeof(tmpfile), "%s.tmp%u", zfilename,
if(!auth_zone_write_chunks(xfr, tmpfile)) {
unlink(tmpfile);
} else if(!auth_zone_write_file(z, tmpfile)) {
unlink(tmpfile);
if(rename(tmpfile, zfilename) < 0) {
log_err("could not rename(%s, %s): %s", tmpfile, zfilename,
unlink(tmpfile);
return(tmpfile());
if ((ofp = tmpfile()) == NULL)
f = tmpfile();
char tmpfile[256];
snprintf(tmpfile, sizeof(tmpfile), "%snsd-xfr-%d/nsd.%u.task.0",
nsd->task[0] = task_file_create(tmpfile);
snprintf(tmpfile, sizeof(tmpfile), "%snsd-xfr-%d/nsd.%u.task.1",
nsd->task[1] = task_file_create(tmpfile);
char* tmpfile = nsd->task[1-nsd->mytask]->fname;
nsd->task[1-nsd->mytask] = task_file_create(tmpfile);
free(tmpfile);
char tmpfile[256];
snprintf(tmpfile, sizeof(tmpfile), "%snsd-xfr-%d/nsd.%u.zstat.0",
nsd->zonestatfname[0] = region_strdup(nsd->region, tmpfile);
snprintf(tmpfile, sizeof(tmpfile), "%snsd-xfr-%d/nsd.%u.zstat.1",
nsd->zonestatfname[1] = region_strdup(nsd->region, tmpfile);
char tmpfile[256];
snprintf(tmpfile, sizeof(tmpfile), "%snsd-xfr-%d/nsd.%u.stat",
nsd->statfname = region_strdup(nsd->region, tmpfile);
if ((fp = tmpfile()) == NULL)
if ((mail.fp = tmpfile()) == NULL)
if ((ofp = tmpfile()) == NULL)
char tmpfile[1024];
if((size_t)strlen(zfilename) + 16 > sizeof(tmpfile)) {
snprintf(tmpfile, sizeof(tmpfile), "%s.tmp%u", zfilename,
if(!auth_zone_write_chunks(xfr, tmpfile)) {
unlink(tmpfile);
} else if(!auth_zone_write_file(z, tmpfile)) {
unlink(tmpfile);
if(rename(tmpfile, zfilename) < 0) {
log_err("could not rename(%s, %s): %s", tmpfile, zfilename,
unlink(tmpfile);