summaryrefslogtreecommitdiffstats
path: root/pcp/Instance.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-09-01 09:49:11 +1000
committerNathan Scott <nathans@redhat.com>2023-09-04 08:59:51 +1000
commiteb86bdf3771493ee7567f7ab336cc8735f618bae (patch)
tree178f8d87528999930602f30b15454c952045c1d9 /pcp/Instance.c
parent5d47e2c50d77e46666f37a3cdb19f27ba3432a9f (diff)
Cast some ignored return codes to assist static checkers
Coverity scanning rightly warns that a usually-checked return status was being ignored in two locations. These two are in cases where it's safe to ignore, so I've adjusted the code to maintain coverage even though they are false positives here.
Diffstat (limited to 'pcp/Instance.c')
-rw-r--r--pcp/Instance.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcp/Instance.c b/pcp/Instance.c
index 1515dfe6..f915350d 100644
--- a/pcp/Instance.c
+++ b/pcp/Instance.c
@@ -81,7 +81,8 @@ static const char* Instance_externalName(Row* super) {
Instance* this = (Instance*) super;
if (!this->name)
- pmNameInDom(InDom_getId(this), Instance_getId(this), &this->name);
+ /* ignore any failure here - its safe and we try again next time */
+ (void)pmNameInDom(InDom_getId(this), Instance_getId(this), &this->name);
return this->name;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy