summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-05-29 13:06:36 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2016-05-31 18:08:46 +0000
commit24cb0ffc6a3711179b34f95a54c12e839b88d43b (patch)
tree47b30bda8537e264e8b2f0a78d40b350f8cd50d4
parent7748c361ef1ca2aaca1e20316b60f28a94821a32 (diff)
downloadostree-24cb0ffc6a3711179b34f95a54c12e839b88d43b.tar.gz
core: Port to new libglnx tempname API
Drops another libgsystem use, and as bonus we malloc less too. Closes: #311 Approved by: jlebon
m---------libglnx0
-rw-r--r--src/libostree/ostree-core.c5
2 files changed, 2 insertions, 3 deletions
diff --git a/libglnx b/libglnx
-Subproject 3d162e772db80f6664a78583268150d2e1d1d29
+Subproject afe3c3a86178c29ceaa3a5e46397ab2fa97202b
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index d393c496..135d15d4 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -989,14 +989,13 @@ _ostree_make_temporary_symlink_at (int tmp_dirfd,
GError **error)
{
gboolean ret = FALSE;
- g_autofree char *tmpname = NULL;
+ char *tmpname = g_strdup ("tmplink.XXXXXX");
guint i;
const int max_attempts = 128;
for (i = 0; i < max_attempts; i++)
{
- g_free (tmpname);
- tmpname = gs_fileutil_gen_tmp_name (NULL, NULL);
+ glnx_gen_temp_name (tmpname);
if (symlinkat (target, tmp_dirfd, tmpname) < 0)
{
if (errno == EEXIST)