summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-02-09 09:01:44 +0000
committerJim Meyering <jim@meyering.net>2005-02-09 09:01:44 +0000
commit045fbb6d7c304643c043f0f18525b591123ffebe (patch)
treef794373eb491d7f26cb683c96b43107adb189fab /src
parentb068caba7ba0aafa0b7d6c49504fc741aaf9ebf2 (diff)
downloadcoreutils-045fbb6d7c304643c043f0f18525b591123ffebe.tar.xz
* src/copy.c (valid_options): Add an assertion that
not both hard_link and symbolic_link are set.
Diffstat (limited to 'src')
-rw-r--r--src/copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index cfe8e5110..85cd638a0 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -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;
}