From 819f39dc9b083c6bf5115cddb364df674739686f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 28 Sep 2003 08:17:39 +0000 Subject: [PATCH] Remove unnecessary cast of alloca, since now it's guaranteed to be (void *). --- src/copy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/copy.c b/src/copy.c index 624e7c68d2..283b6952d6 100644 --- a/src/copy.c +++ b/src/copy.c @@ -310,7 +310,7 @@ copy_reg (const char *src_path, const char *dst_path, /* Make a buffer with space for a sentinel at the end. */ - buf = (char *) alloca (buf_size + sizeof (int)); + buf = alloca (buf_size + sizeof (int)); for (;;) { @@ -1036,7 +1036,7 @@ copy_internal (const char *src_path, const char *dst_path, return 1; } - dst_backup = (char *) alloca (strlen (tmp_backup) + 1); + dst_backup = alloca (strlen (tmp_backup) + 1); strcpy (dst_backup, tmp_backup); free (tmp_backup); if (rename (dst_path, dst_backup)) @@ -1306,7 +1306,7 @@ copy_internal (const char *src_path, const char *dst_path, /* Insert the current directory in the list of parents. */ - dir = (struct dir_list *) alloca (sizeof (struct dir_list)); + dir = alloca (sizeof (struct dir_list)); dir->parent = ancestors; dir->ino = src_sb.st_ino; dir->dev = src_sb.st_dev; @@ -1459,7 +1459,7 @@ copy_internal (const char *src_path, const char *dst_path, { /* See if the destination is already the desired symlink. */ size_t src_link_len = strlen (src_link_val); - char *dest_link_val = (char *) alloca (src_link_len + 1); + char *dest_link_val = alloca (src_link_len + 1); int dest_link_len = readlink (dst_path, dest_link_val, src_link_len + 1); if ((size_t) dest_link_len == src_link_len -- 2.47.2