tree-wide: assorted coccinelle fixes
This commit is contained in:
+9
-10
@@ -660,10 +660,9 @@ static int oci_namespaces(const char *name, JsonVariant *v, JsonDispatchFlags fl
|
||||
s->network_namespace_path = data.path;
|
||||
}
|
||||
|
||||
if (FLAGS_SET(n, data.type)) {
|
||||
if (FLAGS_SET(n, data.type))
|
||||
return json_log(e, flags, SYNTHETIC_ERRNO(EINVAL),
|
||||
"Duplicate namespace specification, refusing.");
|
||||
}
|
||||
|
||||
n |= data.type;
|
||||
}
|
||||
@@ -2216,14 +2215,14 @@ int oci_load(FILE *f, const char *bundle, Settings **ret) {
|
||||
}
|
||||
|
||||
v = json_variant_by_key(oci, "ociVersion");
|
||||
if (!v) {
|
||||
log_error("JSON file '%s' is not an OCI bundle configuration file. Refusing.", path);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!streq_ptr(json_variant_string(v), "1.0.0")) {
|
||||
log_error("OCI bundle version not supported: %s", strna(json_variant_string(v)));
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!v)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"JSON file '%s' is not an OCI bundle configuration file. Refusing.",
|
||||
path);
|
||||
if (!streq_ptr(json_variant_string(v), "1.0.0"))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"OCI bundle version not supported: %s",
|
||||
strna(json_variant_string(v)));
|
||||
|
||||
// {
|
||||
// _cleanup_free_ char *formatted = NULL;
|
||||
|
||||
+1
-1
@@ -4342,7 +4342,7 @@ static int load_settings(void) {
|
||||
|
||||
/* If all settings are masked, there's no point in looking for
|
||||
* the settings file */
|
||||
if ((arg_settings_mask & _SETTINGS_MASK_ALL) == _SETTINGS_MASK_ALL)
|
||||
if (FLAGS_SET(arg_settings_mask, _SETTINGS_MASK_ALL))
|
||||
return 0;
|
||||
|
||||
fn = strjoina(arg_machine, ".nspawn");
|
||||
|
||||
Reference in New Issue
Block a user