diff options
author | Jim Meyering <jim@meyering.net> | 2000-07-23 10:52:05 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-07-23 10:52:05 +0000 |
commit | e66e1f94bb28fd1017de6f38533e52822926e9b1 (patch) | |
tree | 530360c81d21e2a516851bf900eea5f713a65a82 | |
parent | 418ae892b1d6f91062b3bf3df94e92276593da13 (diff) | |
download | coreutils-e66e1f94bb28fd1017de6f38533e52822926e9b1.tar.xz |
(ASSIGN_STRDUPA): Remove macro definition.
-rw-r--r-- | src/remove.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/remove.c b/src/remove.c index 2886066d8..6b8614fac 100644 --- a/src/remove.c +++ b/src/remove.c @@ -70,21 +70,6 @@ int rpl_lstat PARAMS((const char *, struct stat *)); # define S_ISLNK(Mode) 0 #endif -#if defined strdupa -# define ASSIGN_STRDUPA(DEST, S) \ - do { DEST = strdupa(S); } while (0) -#else -# define ASSIGN_STRDUPA(DEST, S) \ - do \ - { \ - const char *s_ = (S); \ - size_t len_ = strlen (s_) + 1; \ - char *tmp_dest_ = (char *) alloca (len_); \ - DEST = memcpy (tmp_dest_, (s_), len_); \ - } \ - while (0) -#endif - /* Initial capacity of per-directory hash table of entries that have been processed but not been deleted. */ #define HT_INITIAL_CAPACITY 13 @@ -838,6 +823,8 @@ rm (struct File_spec *fs, int user_specified_name, const struct rm_options *x) if (user_specified_name) { + /* CAUTION: this use of base_name works only because any + trailing slashes in fs->filename have already been removed. */ char *base = base_name (fs->filename); if (DOT_OR_DOTDOT (base)) |