* master - libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present
@ 2017-01-25 15:29 Bryn Reeves
0 siblings, 0 replies; only message in thread
From: Bryn Reeves @ 2017-01-25 15:29 UTC (permalink / raw)
To: lvm-devel
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1c00bb5da3a53152c5f9e0c9d3382afdec1b2455
Commit: 1c00bb5da3a53152c5f9e0c9d3382afdec1b2455
Parent: ca427a711a33b02264689dcfca4bc5e5d2f9434e
Author: Bryn M. Reeves <bmr@redhat.com>
AuthorDate: Wed Jan 25 15:10:59 2017 +0000
Committer: Bryn M. Reeves <bmr@redhat.com>
CommitterDate: Wed Jan 25 15:29:35 2017 +0000
libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present
If the group_id passed to _stats_group_id_present is equal to the
special value DM_STATS_GROUP_NOT_PRESENT there is no need to perform
any further tests: return false immediately.
---
libdm/libdm-stats.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 6e79a09..f10c6d6 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -261,6 +261,9 @@ static int _stats_group_id_present(const struct dm_stats *dms, uint64_t id)
{
struct dm_stats_group *group = NULL;
+ if (id == DM_STATS_GROUP_NOT_PRESENT)
+ return 0;
+
if (!dms || !dms->regions)
return_0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-25 15:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 15:29 master - libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present Bryn Reeves
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.