]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/copy.c (valid_options): Add an assertion that
authorJim Meyering <jim@meyering.net>
Wed, 9 Feb 2005 09:01:44 +0000 (09:01 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 9 Feb 2005 09:01:44 +0000 (09:01 +0000)
not both hard_link and symbolic_link are set.

src/copy.c

index cfe8e51108849872d0bdb74a8aef573621edebbf..85cd638a00f7aeb589136892642dd0114e2c44ed 100644 (file)
@@ -1,5 +1,5 @@
 /* copy.c -- core functions for copying files and directories
-   Copyright (C) 89, 90, 91, 1995-2004 Free Software Foundation.
+   Copyright (C) 89, 90, 91, 1995-2005 Free Software Foundation.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1649,6 +1649,7 @@ valid_options (const struct cp_options *co)
   assert (co != NULL);
   assert (VALID_BACKUP_TYPE (co->backup_type));
   assert (VALID_SPARSE_MODE (co->sparse_mode));
+  assert (!(co->hard_link && co->symbolic_link));
   return true;
 }