From 0770effc00447bb1a5699fd6e7075acb1d6eb992 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Thu, 10 Jan 2013 12:07:29 +0100 Subject: 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(-) (limited to 'libmount/src/context.c') diff --git a/libmount/src/context.c b/libmount/src/context.c index 35c2f04b0..6a282910d 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; } -- cgit v1.2.3-55-g7522