diff options
author | Akira TAGOH <akira@tagoh.org> | 2006-06-12 02:55:00 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2006-06-12 02:55:00 +0000 |
commit | e68ad975e09abcb6a675ae51b19b3687a907be45 (patch) | |
tree | 1d43fbb769a25a9c364c330b39ec1a145373514f /devices | |
parent | ea05fdcfb28aaa618771d66fb746004108766c3a (diff) |
2006-06-12 Akira TAGOH <at@gclab.org>
* hieroglyph/hgfile.c (hg_file_object_new): use strncpy instead of
strcpy.
* libretto/operator.c (_libretto_operator_op_private_hg_abort):
dump a vm status as well.
(libretto_operator_new): use strncpy instead of strpy.
* devices/cairo/cairo-ps-main.c (device_open): use g_file_open_tmp
instead.
Diffstat (limited to 'devices')
-rw-r--r-- | devices/cairo/cairo-ps-main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/devices/cairo/cairo-ps-main.c b/devices/cairo/cairo-ps-main.c index e9e95f0..0c75071 100644 --- a/devices/cairo/cairo-ps-main.c +++ b/devices/cairo/cairo-ps-main.c @@ -55,14 +55,16 @@ device_open(HgPageInfo *info) { HgDevice *device; HgCairoDevice *cdev; - gchar *filename; + gchar *filename = NULL; gint fd; TRACE_ENTER; - filename = g_build_filename(g_get_tmp_dir(), "ps-embedded-XXXXXX", NULL); - if ((fd = g_mkstemp(filename)) == -1) { + fd = g_file_open_tmp("ps-embedded-XXXXXX", &filename, NULL); + if (fd == -1) { g_warning("Failed to open a file descriptor."); + if (filename) + g_free(filename); return NULL; } |