summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xpm.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-11-11 00:34:47 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-11-11 00:34:47 +0000
commit4a08e76b2b0d4a42ff3672367a165d92c8cb8786 (patch)
treeec4b2a79f3287e759acf07a2e42c3c167074b4e0 /gdk-pixbuf/io-xpm.c
parent48a1ddbeb1ad233b6a7753cebad3a67a1c3039e3 (diff)
downloadgdk-pixbuf-4a08e76b2b0d4a42ff3672367a165d92c8cb8786.tar.gz
Use g_file_open_tmp() (just added to GLib) instead of mkstemp() (or
2000-11-11 Tor Lillqvist <tml@iki.fi> * io-tiff.c (gdk_pixbuf__tiff_image_begin_load): Use g_file_open_tmp() (just added to GLib) instead of mkstemp() (or mktemp() and open()). * io-xpm.c (gdk_pixbuf__xpm_image_begin_load): Ditto.
Diffstat (limited to 'gdk-pixbuf/io-xpm.c')
-rw-r--r--gdk-pixbuf/io-xpm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index b762c8705..df561498f 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -1413,10 +1413,9 @@ gdk_pixbuf__xpm_image_begin_load (ModulePreparedNotifyFunc prepare_func,
context->update_func = update_func;
context->user_data = user_data;
context->all_okay = TRUE;
- context->tempname = g_strdup ("/tmp/gdkpixbuf-xpm-tmp.XXXXXX");
- fd = mkstemp (context->tempname);
+ fd = g_file_open_tmp ("gdkpixbuf-xpm-tmp.XXXXXX", &context->tempname,
+ NULL);
if (fd < 0) {
- g_free (context->tempname);
g_free (context);
return NULL;
}