static void cleanup (void);
static struct temp_dir *temp_dir;
-struct hmapx map;
+static struct hmapx map;
static void
setup (void)
file_name = xasprintf ("%s/%d", temp_dir->dir_name, idx++);
register_temp_file (temp_dir, file_name);
- stream = fopen_temp (file_name, "wb+");
+ stream = fopen_temp (file_name, "wb+", true);
if (stream == NULL)
unregister_temp_file (temp_dir, file_name);
else
struct hmapx_node *node = hmapx_first_with_hash (&map, hash_pointer (file, 0));
char *fn = node->data;
fclose_temp (file);
- cleanup_temp_file (temp_dir, fn);
+ cleanup_temp_file (temp_dir, fn);
hmapx_delete (&map, node);
free (fn);
}