summaryrefslogtreecommitdiff
path: root/devices
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2006-06-12 02:55:00 +0000
committerAkira TAGOH <akira@tagoh.org>2006-06-12 02:55:00 +0000
commite68ad975e09abcb6a675ae51b19b3687a907be45 (patch)
tree1d43fbb769a25a9c364c330b39ec1a145373514f /devices
parentea05fdcfb28aaa618771d66fb746004108766c3a (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.c8
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;
}