summaryrefslogtreecommitdiffstats
path: root/libmount/src/context.c
diff options
context:
space:
mode:
authorOndrej Oprala2013-01-10 12:07:29 +0100
committerKarel Zak2013-01-10 14:52:12 +0100
commit0770effc00447bb1a5699fd6e7075acb1d6eb992 (patch)
treec9fec5854a61491b5570b4551d8e73ec172a5ec1 /libmount/src/context.c
parentlibblkid: make btrfs magics more readable (diff)
downloadkernel-qcow2-util-linux-0770effc00447bb1a5699fd6e7075acb1d6eb992.tar.gz
kernel-qcow2-util-linux-0770effc00447bb1a5699fd6e7075acb1d6eb992.tar.xz
kernel-qcow2-util-linux-0770effc00447bb1a5699fd6e7075acb1d6eb992.zip
libmount: fix regression test helper
Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r--libmount/src/context.c4
1 files changed, 2 insertions, 2 deletions
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;
}