]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(rm): Use free rather than XFREE.
authorJim Meyering <jim@meyering.net>
Sat, 22 May 2004 16:29:20 +0000 (16:29 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 22 May 2004 16:29:20 +0000 (16:29 +0000)
(remove_dir): Use xmalloc, not XMALLOC.
(ds_init): Likewise.

src/remove.c

index 2973314170f99ce1e2a16fa773a6c5957472e72c..7ea522b1aa6607fd2088adb1dfd9ea57cb3d803a 100644 (file)
@@ -149,7 +149,7 @@ typedef struct dirstack_state Dirstack_state;
 static Dirstack_state *
 ds_init ()
 {
-  Dirstack_state *ds = XMALLOC (struct dirstack_state, 1);
+  Dirstack_state *ds = xmalloc (sizeof *ds);
   obstack_init (&ds->dir_stack);
   obstack_init (&ds->len_stack);
   obstack_init (&ds->Active_dir);
@@ -962,7 +962,7 @@ remove_dir (Dirstack_state *ds, char const *dir, struct saved_cwd **cwd_state,
 
   if (*cwd_state == NULL)
     {
-      *cwd_state = XMALLOC (struct saved_cwd, 1);
+      *cwd_state = xmalloc (sizeof **cwd_state);
       if (save_cwd (*cwd_state))
        {
          error (0, errno, _("cannot get current directory"));
@@ -1141,7 +1141,7 @@ rm (size_t n_files, char const *const *file, struct rm_options const *x)
 
   ds_free (ds);
 
-  XFREE (cwd_state);
+  free (cwd_state);
 
   return status;
 }