summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-12-31 21:59:42 +0000
committerJim Meyering <jim@meyering.net>1998-12-31 21:59:42 +0000
commit91dc8874b0550474ebb80747f9d4aecebe002824 (patch)
tree0cba14e6b7ec939822cc6821c898a47914f2947d /src
parent58d6acdfd349bfe920dae2aac5e0d9f9bc7e601b (diff)
downloadcoreutils-91dc8874b0550474ebb80747f9d4aecebe002824.tar.xz
(main): Use XARGCASEMATCH in place of argmatch & co.
Diffstat (limited to 'src')
-rw-r--r--src/cp.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/cp.c b/src/cp.c
index 59541f340..c2d15179c 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -655,18 +655,8 @@ main (int argc, char **argv)
break;
case CHAR_MAX + 1:
- {
- int i;
-
- /* --sparse={never,auto,always} */
- i = argmatch (optarg, sparse_type_string);
- if (i < 0)
- {
- invalid_arg (_("sparse type"), optarg, i);
- usage (1);
- }
- x.sparse_mode = sparse_type[i];
- }
+ x.sparse_mode = XARGCASEMATCH ("--sparse", optarg,
+ sparse_type_string, sparse_type);
break;
case 'a': /* Like -dpR. */