libmount: fix potential null pointer dereference
This is false positive warning, but lets silence it so that if and when warnings crop up they are easy to notice and take seriously. libmount/src/optstr.c:354:29: warning: potential null pointer dereference [-Wnull-dereference] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
34813bdd29
commit
371be858d7
|
@ -351,7 +351,9 @@ int mnt_optstr_deduplicate_option(char **optstr, const char *name)
|
|||
end = ol.end;
|
||||
opt = end && *end ? end + 1 : NULL;
|
||||
}
|
||||
} while (rc == 0 && opt && *opt);
|
||||
if (opt == NULL)
|
||||
break;
|
||||
} while (rc == 0 && *opt);
|
||||
|
||||
return rc < 0 ? rc : begin ? 0 : 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue