2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00

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 <h.huangqiang@huawei.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Huang Qiang 2012-11-02 13:44:26 +04:00 committed by Pavel Emelyanov
parent 0fa83b0394
commit 0c23c5835e

View File

@ -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)) {