diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-19 15:18:40 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-19 15:18:40 -0500 |
commit | cde0cf28a20d36c7f0560b391dc4aca0f5bbd539 (patch) | |
tree | cec3247789e73b8d77c49e76efc136636c7c0e34 /src | |
parent | 0f5777cbd419a27e4407caf152e31afe30984b39 (diff) | |
parent | 79d629725240a3fc5a4684bd42aefc7d87197c5c (diff) |
Merge pull request #2666 from keszybz/coverity-fixes
Coverity fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/process-util.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-resolve/sd-resolve.c | 2 | ||||
-rw-r--r-- | src/resolve/resolved-dns-cache.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 189ef9ab60..27663eee51 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -205,7 +205,7 @@ void rename_process(const char name[8]) { * "systemd"). If you pass a longer string it will be * truncated */ - prctl(PR_SET_NAME, name); + (void) prctl(PR_SET_NAME, name); if (program_invocation_name) strncpy(program_invocation_name, name, strlen(program_invocation_name)); diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index de17a6112e..d693b2c2b0 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -403,7 +403,7 @@ static void* thread_worker(void *p) { assert_se(pthread_sigmask(SIG_BLOCK, &fullset, NULL) == 0); /* Assign a pretty name to this thread */ - prctl(PR_SET_NAME, (unsigned long) "sd-resolve"); + (void) prctl(PR_SET_NAME, (unsigned long) "sd-resolve"); while (!resolve->dead) { union { diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index 4b7672fbbf..fb957db9ef 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -402,7 +402,7 @@ static int dns_cache_put_positive( k = dns_cache_remove_by_rr(c, rr); log_debug("%s: %s", k > 0 ? "Removed zero TTL entry from cache" : "Not caching zero TTL cache entry", - dns_resource_key_to_string(i->key, key_str, sizeof key_str)); + dns_resource_key_to_string(rr->key, key_str, sizeof key_str)); return 0; } @@ -497,7 +497,7 @@ static int dns_cache_put_negative( if (nsec_ttl <= 0 || soa->soa.minimum <= 0 || soa->ttl <= 0) { log_debug("Not caching negative entry with zero SOA/NSEC/NSEC3 TTL: %s", - dns_resource_key_to_string(i->key, key_str, sizeof key_str)); + dns_resource_key_to_string(key, key_str, sizeof key_str)); return 0; } |