1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00

Merge pull request #20371 from bluca/coverity

Two small coverity fixes
This commit is contained in:
Luca Boccassi 2021-08-03 21:14:31 +01:00 committed by GitHub
commit 1c32b76996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View File

@ -999,7 +999,7 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
_public_ sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m) {
if (m)
close_nointr(MONITOR_TO_FD(m));
(void) close_nointr(MONITOR_TO_FD(m));
return NULL;
}

View File

@ -444,7 +444,7 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category
_public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
if (m)
close_nointr(MONITOR_TO_FD(m));
(void) close_nointr(MONITOR_TO_FD(m));
return NULL;
}

View File

@ -141,7 +141,7 @@ static int session_device_open(SessionDevice *sd, bool active) {
* that so fail at all times and let caller retry in inactive state. */
r = sd_drmsetmaster(fd);
if (r < 0) {
close_nointr(fd);
(void) close_nointr(fd);
return r;
}
} else

View File

@ -299,6 +299,8 @@ int get_credential_host_secret(CredentialSecretFlags flags, void **ret, size_t *
if (ret) {
void *copy;
assert(sz <= sizeof(f->data)); /* Ensure we don't read past f->data bounds */
copy = memdup(f->data, sz);
if (!copy)
return -ENOMEM;