]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(make_dir_parents): Remove unnecessary casts of alloca,
authorJim Meyering <jim@meyering.net>
Tue, 20 Dec 2005 10:28:53 +0000 (10:28 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 20 Dec 2005 10:28:53 +0000 (10:28 +0000)
since now it's guaranteed to be (void *).

lib/mkdir-p.c

index e970e118d4bdd76ac892b5fe9422bd0cac832785..3923fbee10d5acf41ad5783b568f15c197f4c98b 100644 (file)
@@ -123,7 +123,7 @@ make_dir_parents (char const *arg,
       mode_t oldmask = umask (0);
 
       /* Make a copy of ARG that we can scribble NULs on.  */
-      dir = (char *) alloca (strlen (arg) + 1);
+      dir = alloca (strlen (arg) + 1);
       strcpy (dir, arg);
       strip_trailing_slashes (dir);
       full_dir = dir;
@@ -210,8 +210,7 @@ make_dir_parents (char const *arg,
 
              if (re_protect)
                {
-                 struct ptr_list *new = (struct ptr_list *)
-                   alloca (sizeof *new);
+                 struct ptr_list *new = alloca (sizeof *new);
                  new->dirname_end = slash;
                  new->next = leading_dirs;
                  leading_dirs = new;