Take advantage of new dynamic string macros.
[checkpath] / tmpdir.c
index 4a2843d..fed0810 100644 (file)
--- a/tmpdir.c
+++ b/tmpdir.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: tmpdir.c,v 1.2 1999/05/19 20:37:28 mdw Exp $
+ * $Id: tmpdir.c,v 1.3 1999/05/21 22:07:20 mdw Exp $
  *
  * Choose and check temporary directories
  *
@@ -29,6 +29,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: tmpdir.c,v $
+ * Revision 1.3  1999/05/21 22:07:20  mdw
+ * Take advantage of new dynamic string macros.
+ *
  * Revision 1.2  1999/05/19 20:37:28  mdw
  * Track gratuitous change in mdwopt interface.
  *
@@ -131,7 +134,7 @@ static char *trytmp(const char *parent, const char *base)
                      "ABCDEFGHIJKLMNOPQRSTUVWXYZ" };
   char *p, *q;
   char *qq;
-  dstr d;
+  dstr d = DSTR_INIT;
   int createflag = 1;
 
   /* --- Make sure the parent directory is sane --- *
@@ -147,7 +150,6 @@ static char *trytmp(const char *parent, const char *base)
 
   /* --- See whether the trivial version will work --- */
 
-  dstr_create(&d);
   dstr_putf(&d, "%s/%s", parent, base);
   if (ok(d.buf, &createflag))
     goto good;