Assorted coverity fixes (#42738)
Coverity is back online, and it's not happy
This commit is contained in:
@@ -6823,8 +6823,10 @@ int config_parse_luo_sessions(
|
||||
"Failed to parse LUOSession= value, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
if (r == 0) {
|
||||
strv_sort(*sessions);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!luo_session_name_is_valid(word)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
@@ -6842,6 +6844,4 @@ int config_parse_luo_sessions(
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
strv_sort(*sessions);
|
||||
}
|
||||
|
||||
@@ -895,6 +895,8 @@ static int dump_dhcp_option_one(Table *table, sd_dhcp_message *message, uint8_t
|
||||
bool fallback = false;
|
||||
if (type == DHCP_OPTION_TYPE_AUTO) {
|
||||
type = dhcp_option_type_from_code(code);
|
||||
if (type < 0)
|
||||
return type;
|
||||
fallback = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -422,8 +422,6 @@ static int loop_write_zero_blocking_reader_fiber(void *userdata) {
|
||||
_cleanup_free_ char *buf = malloc(ctx->total);
|
||||
ASSERT_NOT_NULL(buf);
|
||||
ssize_t n = loop_read(ctx->pipefd[0], buf, ctx->total, /* do_poll= */ true);
|
||||
if (n < 0)
|
||||
return (int) n;
|
||||
return (int) n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user