From 784757faa91b4570465e7fc6453305324e686a0a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 7 Dec 2012 12:06:30 -0800 Subject: [PATCH] ITS#7465 fail if both -a and -s specified --- libraries/liblmdb/mdb_stat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/liblmdb/mdb_stat.c b/libraries/liblmdb/mdb_stat.c index 4dfcf49645..e9981f6016 100644 --- a/libraries/liblmdb/mdb_stat.c +++ b/libraries/liblmdb/mdb_stat.c @@ -62,6 +62,8 @@ int main(int argc, char *argv[]) while ((i = getopt(argc, argv, "aefns:")) != EOF) { switch(i) { case 'a': + if (subname) + usage(prog); alldbs++; break; case 'e': @@ -74,6 +76,8 @@ int main(int argc, char *argv[]) envflags |= MDB_NOSUBDIR; break; case 's': + if (alldbs) + usage(prog); subname = optarg; break; default: -- 2.39.5