Allow $TMPDIR to override most temporary directory uses.
[libguestfs.git] / fish / hexedit.c
index dfa1889..bd3efc8 100644 (file)
@@ -100,7 +100,7 @@ run_hexedit (const char *cmd, int argc, char *argv[])
   int r;
   struct stat oldstat, newstat;
   char buf[BUFSIZ];
-  char tmp[] = "/tmp/guestfishXXXXXX";
+  TMP_TEMPLATE_ON_STACK (tmp);
   int fd = mkstemp (tmp);
   if (fd == -1) {
     perror ("mkstemp");