Commit 0c23c583 authored by Huang Qiang's avatar Huang Qiang Committed by Pavel Emelyanov

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: 's avatarHuang Qiang <h.huangqiang@huawei.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 0fa83b03
...@@ -147,7 +147,7 @@ int main(int argc, char *argv[]) ...@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
return -1; return -1;
break; break;
case 'v': case 'v':
if (optind < argc - 1) { if (optind < argc) {
char *opt = argv[optind]; char *opt = argv[optind];
if (isdigit(*opt)) { if (isdigit(*opt)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment