summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-01 06:43:04 +0000
committerJim Meyering <jim@meyering.net>1999-01-01 06:43:04 +0000
commit46166ad9b7d04eb47c6a1eef6e43e7f09bf9ec37 (patch)
tree458ad45344c9c2ee87279530c0ab3e8a034776ed /lib
parentbf97e5a0b8a514cc2d81bb8f08d56b57d787b554 (diff)
downloadcoreutils-46166ad9b7d04eb47c6a1eef6e43e7f09bf9ec37.tar.xz
(get_version): Use XARGCASEMATCH in place of argmatch & co.
Diffstat (limited to 'lib')
-rw-r--r--lib/backupfile.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/backupfile.c b/lib/backupfile.c
index a1b05a123..321a44604 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -228,15 +228,8 @@ static const enum backup_type backup_types[] =
enum backup_type
get_version (const char *version)
{
- int i;
-
if (version == 0 || *version == 0)
return numbered_existing;
- i = argmatch (version, backup_args);
- if (i < 0)
- {
- invalid_arg ("version control type", version, i);
- exit (2);
- }
- return backup_types[i];
+ return XARGCASEMATCH ("version control type", version,
+ backup_args, backup_types);
}