X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Ftemp-file.c;h=cc90a37559b2cb532e8cc60f5589da531b8bd211;hb=82e6fde7bd3bde18dca346519cfc7f6f2bf740e0;hp=d121cb9e2e5fc42466aeb0f68fd42bdb5f9daf61;hpb=14decddbe997e8059910e02d28c5cccd747240fc;p=pspp diff --git a/src/libpspp/temp-file.c b/src/libpspp/temp-file.c index d121cb9e2e..cc90a37559 100644 --- a/src/libpspp/temp-file.c +++ b/src/libpspp/temp-file.c @@ -43,7 +43,7 @@ static void cleanup (void); static struct temp_dir *temp_dir; -struct hmapx map; +static struct hmapx map; static void setup (void) @@ -105,7 +105,7 @@ create_temp_file (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 @@ -125,7 +125,7 @@ close_temp_file (FILE *file) 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); }