mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
fstab-generator: add missing assertions
This commit is contained in:
@@ -191,6 +191,8 @@ static int mount_array_add_swap(bool for_initrd, const char *str) {
|
||||
static int write_options(FILE *f, const char *options) {
|
||||
_cleanup_free_ char *o = NULL;
|
||||
|
||||
assert(f);
|
||||
|
||||
if (isempty(options))
|
||||
return 0;
|
||||
|
||||
@@ -208,6 +210,9 @@ static int write_options(FILE *f, const char *options) {
|
||||
static int write_what(FILE *f, const char *what) {
|
||||
_cleanup_free_ char *w = NULL;
|
||||
|
||||
assert(f);
|
||||
assert(what);
|
||||
|
||||
w = specifier_escape(what);
|
||||
if (!w)
|
||||
return log_oom();
|
||||
|
||||
Reference in New Issue
Block a user