mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(get_version): Use XARGCASEMATCH in place of argmatch & co.
This commit is contained in:
1 parent
bf97e5a0b8
commit
46166ad9b7
1 file changed
+2
-9
+2
-9
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user