diff options
author | Jim Meyering <jim@meyering.net> | 2004-05-22 16:29:20 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-05-22 16:29:20 +0000 |
commit | 3ba72c8b9c441cd4355c598609a4f6f6f9d5d9ec (patch) | |
tree | 36c7e2950d0cf57b8d5692045a4bb5f2217641ee | |
parent | e5e96abfd28ae4ed227b685ea3d4fbf354e2f4be (diff) | |
download | coreutils-3ba72c8b9c441cd4355c598609a4f6f6f9d5d9ec.tar.xz |
(rm): Use free rather than XFREE.
(remove_dir): Use xmalloc, not XMALLOC.
(ds_init): Likewise.
-rw-r--r-- | src/remove.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remove.c b/src/remove.c index 297331417..7ea522b1a 100644 --- a/src/remove.c +++ b/src/remove.c @@ -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; } |