summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f1def5)
raw | patch | inline | side by side (parent: 3f1def5)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 1 Jul 2009 14:59:28 +0000 (16:59 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 1 Jul 2009 14:59:28 +0000 (16:59 +0200) |
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index d88f503d5f0a2b1b7b1ba59296b4fc550e279775..75f52df651c56f6dbdeabe7631dfb0653c145539 100644 (file)
--- a/src/network.c
+++ b/src/network.c
switch (pkg_types[i])
{
case DS_TYPE_COUNTER:
- pkg_values[i].counter = ntohll (pkg_values[i].counter);
+ pkg_values[i].counter = (counter_t) ntohll (pkg_values[i].counter);
break;
case DS_TYPE_GAUGE:
- pkg_values[i].gauge = ntohd (pkg_values[i].gauge);
+ pkg_values[i].gauge = (gauge_t) ntohd (pkg_values[i].gauge);
break;
case DS_TYPE_DERIVE:
- pkg_values[i].derive = ntohll (pkg_values[i].derive);
+ pkg_values[i].derive = (derive_t) ntohll (pkg_values[i].derive);
break;
case DS_TYPE_ABSOLUTE:
- pkg_values[i].absolute = ntohll (pkg_values[i].absolute);
+ pkg_values[i].absolute = (absolute_t) ntohll (pkg_values[i].absolute);
break;
default:
pkg_types[i]);
return (-1);
} /* switch (pkg_types[i]) */
-
- if (pkg_types[i] == DS_TYPE_COUNTER)
- pkg_values[i].counter = ntohll (pkg_values[i].counter);
- else if (pkg_types[i] == DS_TYPE_GAUGE)
- pkg_values[i].gauge = ntohd (pkg_values[i].gauge);
}
*ret_buffer = buffer;