summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d883b1)
raw | patch | inline | side by side (parent: 1d883b1)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 1 Jul 2009 14:56:56 +0000 (16:56 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 1 Jul 2009 14:56:56 +0000 (16:56 +0200) |
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index dd82ed9487d3531afe131463a6ba7f6074704e60..50def1fccb7032ffb8be01efb3f161d305f2c3d8 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
if (NULL != (tmp = hv_fetch (hash, "type", 4, 0))) {
ds->type = SvIV (*tmp);
- if ((DS_TYPE_COUNTER != ds->type) && (DS_TYPE_GAUGE != ds->type) && (DS_TYPE_DERIVE != ds->type) && (DS_TYPE_ABSOLUTE != ds->type)) {
+ if ((DS_TYPE_COUNTER != ds->type)
+ && (DS_TYPE_GAUGE != ds->type)
+ && (DS_TYPE_DERIVE != ds->type)
+ && (DS_TYPE_ABSOLUTE != ds->type)) {
log_err ("hv2data_source: Invalid DS type.");
return -1;
}
else if (DS_TYPE_GAUGE == ds->ds[i].type)
val = newSVnv (vl->values[i].gauge);
else if (DS_TYPE_DERIVE == ds->ds[i].type)
- val = newSVnv (vl->values[i].derive);
+ val = newSViv (vl->values[i].derive);
else if (DS_TYPE_ABSOLUTE == ds->ds[i].type)
- val = newSVnv (vl->values[i].absolute);
+ val = newSViv (vl->values[i].absolute);
if (NULL == av_store (values, i, val)) {
av_undef (values);