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:
Jan Beulich committed 2023-06-14 12:31:23 +02:00
1 parent cf584d27f5
commit 129aba0e79
1 file changed
+10 -13
+10 -13
View File
@@ -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");
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.