]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(do_link): find_backup_file_name no longer returns NULL, so don't
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Jul 2004 23:14:30 +0000 (23:14 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Jul 2004 23:14:30 +0000 (23:14 +0000)
bother to check for this.

src/ln.c

index 97a962af003312762f89e6d5bc607bc3aae4cb57..72d50fd62ea3e932073ca68e76176221111d7b83 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -255,11 +255,8 @@ do_link (const char *source, const char *dest, bool dest_is_dir)
 
       if (backup_type != none)
        {
-         size_t buf_len;
          char *tmp_backup = find_backup_file_name (dest, backup_type);
-         if (tmp_backup == NULL)
-           xalloc_die ();
-         buf_len = strlen (tmp_backup) + 1;
+         size_t buf_len = strlen (tmp_backup) + 1;
          dest_backup = alloca (buf_len);
          memcpy (dest_backup, tmp_backup, buf_len);
          free (tmp_backup);