summary refs log tree commit diff
path: root/support/support_chroot.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-11-18 14:11:09 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-11-18 14:11:09 +0100
commit8adfb0eeffd1888f9b53b8d8677eb1656cd20e47 (patch)
tree1b5cabdb49792cbee8839fee6d907b5d9513a4b0 /support/support_chroot.c
parentdf0c40ee3a893238ac11f4c0d876a0c3b49d198d (diff)
downloadglibc-8adfb0eeffd1888f9b53b8d8677eb1656cd20e47.tar.gz
glibc-8adfb0eeffd1888f9b53b8d8677eb1656cd20e47.tar.xz
glibc-8adfb0eeffd1888f9b53b8d8677eb1656cd20e47.zip
support_create_temp_directory: Align behavior with create_temp_file
create_temp_file automatically supplies the test directory and the
XXXXXX suffix.  support_create_temp_directory required the caller to
specify them, which was confusing.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'support/support_chroot.c')
-rw-r--r--support/support_chroot.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/support/support_chroot.c b/support/support_chroot.c
index f6fad18f33..693813f694 100644
--- a/support/support_chroot.c
+++ b/support/support_chroot.c
@@ -45,12 +45,7 @@ struct support_chroot *
 support_chroot_create (struct support_chroot_configuration conf)
 {
   struct support_chroot *chroot = xmalloc (sizeof (*chroot));
-
-  {
-    char *template = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir);
-    chroot->path_chroot = support_create_temp_directory (template);
-    free (template);
-  }
+  chroot->path_chroot = support_create_temp_directory ("tst-resolv-res_init-");
 
   /* Create the /etc directory in the chroot environment.  */
   char *path_etc = xasprintf ("%s/etc", chroot->path_chroot);