#ifndef TEMPFILE_H
#define TEMPFILE_H
+#include "list.h"
+
/*
* Handle temporary files.
*
*/
struct tempfile {
- struct tempfile *volatile next;
+ volatile struct volatile_list_head list;
volatile sig_atomic_t active;
volatile int fd;
FILE *volatile fp;
static inline int is_tempfile_active(struct tempfile *tempfile)
{
- return tempfile->active;
+ return tempfile && tempfile->active;
}
/*