From 0770effc00447bb1a5699fd6e7075acb1d6eb992 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Thu, 10 Jan 2013 12:07:29 +0100 Subject: [PATCH] libmount: fix regression test helper Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak --- libmount/src/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmount/src/context.c b/libmount/src/context.c index 35c2f04b08..6a282910d0 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2334,11 +2334,11 @@ int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) return -ENOMEM; if (argc > 2) { - if (!strcmp(argv[idx], "-O")) { + if (argv[idx] && !strcmp(argv[idx], "-O")) { mnt_context_set_options_pattern(cxt, argv[idx + 1]); idx += 2; } - if (!strcmp(argv[idx], "-t")) { + if (argv[idx] && !strcmp(argv[idx], "-t")) { mnt_context_set_fstype_pattern(cxt, argv[idx + 1]); idx += 2; } -- 2.47.2