lib/repo: Move alloca() outside of loop
Just noticed this while looking at the code for a different issue. Closes: #1201 Approved by: jlebon
This commit is contained in:
parent
75150fe04a
commit
3767ac4ad8
|
|
@ -5179,11 +5179,11 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd,
|
|||
ret_tmpdir.initialized = TRUE;
|
||||
}
|
||||
|
||||
const char *tmpdir_name_template = glnx_strjoina (tmpdir_prefix, "XXXXXX");
|
||||
while (!ret_tmpdir.initialized)
|
||||
{
|
||||
g_auto(GLnxTmpDir) new_tmpdir = { 0, };
|
||||
/* No existing tmpdir found, create a new */
|
||||
const char *tmpdir_name_template = glnx_strjoina (tmpdir_prefix, "XXXXXX");
|
||||
if (!glnx_mkdtempat (tmpdir_dfd, tmpdir_name_template, 0755,
|
||||
&new_tmpdir, error))
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue