mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()
The variable needs to be properly set only on the error paths.
Coverity ID: 1532311
Fixes: ab4440112b ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.cm>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
cf584d27f5
commit
129aba0e79
1 file changed
+10
-13
@@ -1081,13 +1081,12 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
|
||||
ret = libxl_flask_context_to_sid(ctx, s, strlen(s),
|
||||
&d_config->c_info.ssidref);
|
||||
if (ret) {
|
||||
if (errno == ENOSYS) {
|
||||
LOGD(WARN, domid, "XSM Disabled: init_seclabel not supported");
|
||||
ret = 0;
|
||||
} else {
|
||||
if (errno != ENOSYS) {
|
||||
LOGD(ERROR, domid, "Invalid init_seclabel: %s", s);
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
LOGD(WARN, domid, "XSM Disabled: init_seclabel not supported");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1096,13 +1095,12 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
|
||||
ret = libxl_flask_context_to_sid(ctx, s, strlen(s),
|
||||
&d_config->b_info.exec_ssidref);
|
||||
if (ret) {
|
||||
if (errno == ENOSYS) {
|
||||
LOGD(WARN, domid, "XSM Disabled: seclabel not supported");
|
||||
ret = 0;
|
||||
} else {
|
||||
if (errno != ENOSYS) {
|
||||
LOGD(ERROR, domid, "Invalid seclabel: %s", s);
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
LOGD(WARN, domid, "XSM Disabled: seclabel not supported");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1111,14 +1109,13 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
|
||||
ret = libxl_flask_context_to_sid(ctx, s, strlen(s),
|
||||
&d_config->b_info.device_model_ssidref);
|
||||
if (ret) {
|
||||
if (errno == ENOSYS) {
|
||||
LOGD(WARN, domid,
|
||||
"XSM Disabled: device_model_stubdomain_seclabel not supported");
|
||||
ret = 0;
|
||||
} else {
|
||||
if (errno != ENOSYS) {
|
||||
LOGD(ERROR, domid, "Invalid device_model_stubdomain_seclabel: %s", s);
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
LOGD(WARN, domid,
|
||||
"XSM Disabled: device_model_stubdomain_seclabel not supported");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||