From 0c23c5835e1d457d58a181cc7ed24f5f6104cbc7 Mon Sep 17 00:00:00 2001 From: Huang Qiang Date: Fri, 2 Nov 2012 13:44:26 +0400 Subject: [PATCH] crtools: fix a bug that log_level may not work If we use -v [num] to set log_level and we happen to set it in the end of arguments, the [num] we set may not work. This patch will fix it. Signed-off-by: Huang Qiang Signed-off-by: Pavel Emelyanov --- crtools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crtools.c b/crtools.c index 206a3d126..f998344bf 100644 --- a/crtools.c +++ b/crtools.c @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) return -1; break; case 'v': - if (optind < argc - 1) { + if (optind < argc) { char *opt = argv[optind]; if (isdigit(*opt)) {