Skip to content

Commit a8ffde5

Browse files
committed
Merge branch 'fix-inst-compare'
2 parents 1f7bffa + cd8f89d commit a8ffde5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pcp/InDomTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ InDomTable* InDomTable_new(Machine* host, pmInDom indom, int metricKey) {
3535
this->id = indom;
3636

3737
Table* super = &this->super;
38-
Table_init(super, Class(Row), host);
38+
Table_init(super, Class(Instance), host);
3939

4040
return this;
4141
}

pcp/Instance.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ static int Instance_compareByKey(const Row* v1, const Row* v2, int key) {
103103
unsigned int type = Metric_type(metric);
104104

105105
pmAtomValue atom1 = {0}, atom2 = {0};
106-
if (!Metric_instance(metric, i1->offset, i1->offset, &atom1, type) ||
107-
!Metric_instance(metric, i2->offset, i2->offset, &atom2, type)) {
106+
if (!Metric_instance(metric, Instance_getId(i1), i1->offset, &atom1, type) ||
107+
!Metric_instance(metric, Instance_getId(i2), i2->offset, &atom2, type)) {
108108
if (type == PM_TYPE_STRING) {
109109
free(atom1.cp);
110110
free(atom2.cp);

0 commit comments

Comments
 (0)