summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-13 12:12:36 +0000
committerJim Meyering <jim@meyering.net>2005-09-13 12:12:36 +0000
commit2922ae7380faa5b274b11c7298103560c6ad4665 (patch)
treec7b3a614e44fd1375c78f787b31eb9412d87dcda
parent4034cf6ad5a707da0f74219ea425ab6a9ca47aa5 (diff)
downloadcoreutils-2922ae7380faa5b274b11c7298103560c6ad4665.tar.xz
Use ARGMATCH_VERIFY, just in case.
-rw-r--r--lib/backupfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/backupfile.c b/lib/backupfile.c
index ebc0fce87..35dde4647 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -332,7 +332,7 @@ find_backup_file_name (char const *file, enum backup_type backup_type)
static char const * const backup_args[] =
{
- /* In a series of synonyms, present the most meaning full first, so
+ /* In a series of synonyms, present the most meaningful first, so
that argmatch_valid be more readable. */
"none", "off",
"simple", "never",
@@ -349,6 +349,10 @@ static const enum backup_type backup_types[] =
numbered_backups, numbered_backups
};
+/* Ensure that these two vectors have the same number of elements,
+ not counting the final NULL in the first one. */
+ARGMATCH_VERIFY (backup_args, backup_types);
+
/* Return the type of backup specified by VERSION.
If VERSION is NULL or the empty string, return numbered_existing_backups.
If VERSION is invalid or ambiguous, fail with a diagnostic appropriate