]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix regression test helper
authorOndrej Oprala <ondrej.oprala@gmail.com>
Thu, 10 Jan 2013 11:07:29 +0000 (12:07 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 10 Jan 2013 13:52:12 +0000 (14:52 +0100)
Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c

index 35c2f04b08c2ca48756f598c8d1c05c4bf69b3f3..6a282910d069af41d4d81f5a97ab47e44a0afb4f 100644 (file)
@@ -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;
                }