projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
{GPL, other}: Relicense to MIT license.
[collectd.git]
/
src
/
java.c
diff --git
a/src/java.c
b/src/java.c
index
af0861f
..
c8d70f5
100644
(file)
--- a/
src/java.c
+++ b/
src/java.c
@@
-17,7
+17,7
@@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Florian octo Forster <octo at
verplant
.org>
+ * Florian octo Forster <octo at
collectd
.org>
* Justo Alonso Achaques <justo.alonso at gmail.com>
**/
* Justo Alonso Achaques <justo.alonso at gmail.com>
**/
@@
-906,7
+906,7
@@
static jobject ctoj_notification (JNIEnv *jvm_env, /* {{{ */
#undef SET_STRING
/* Set the `time' member. Java stores time in milliseconds. */
#undef SET_STRING
/* Set the `time' member. Java stores time in milliseconds. */
- status = ctoj_long (jvm_env, (
(jlong) n->time) * ((jlong) 1000
),
+ status = ctoj_long (jvm_env, (
jlong) CDTIME_T_TO_MS (n->time
),
c_notification, o_notification, "setTime");
if (status != 0)
{
c_notification, o_notification, "setTime");
if (status != 0)
{
@@
-1306,7
+1306,7
@@
static int jtoc_notification (JNIEnv *jvm_env, notification_t *n, /* {{{ */
return (-1);
}
/* Java measures time in milliseconds. */
return (-1);
}
/* Java measures time in milliseconds. */
- n->time =
(time_t) (tmp_long / ((jlong) 1000)
);
+ n->time =
MS_TO_CDTIME_T(tmp_long
);
status = jtoc_int (jvm_env, &tmp_int,
class_ptr, object_ptr, "getSeverity");
status = jtoc_int (jvm_env, &tmp_int,
class_ptr, object_ptr, "getSeverity");
@@
-2256,7
+2256,6
@@
static int cjni_config_plugin_block (oconfig_item_t *ci) /* {{{ */
cjni_callback_info_t *cbi;
jobject o_ocitem;
const char *name;
cjni_callback_info_t *cbi;
jobject o_ocitem;
const char *name;
- int status;
size_t i;
jclass class;
size_t i;
jclass class;
@@
-2311,7
+2310,7
@@
static int cjni_config_plugin_block (oconfig_item_t *ci) /* {{{ */
method = (*jvm_env)->GetMethodID (jvm_env, class,
"config", "(Lorg/collectd/api/OConfigItem;)I");
method = (*jvm_env)->GetMethodID (jvm_env, class,
"config", "(Lorg/collectd/api/OConfigItem;)I");
-
status =
(*jvm_env)->CallIntMethod (jvm_env,
+ (*jvm_env)->CallIntMethod (jvm_env,
cbi->object, method, o_ocitem);
(*jvm_env)->DeleteLocalRef (jvm_env, o_ocitem);
cbi->object, method, o_ocitem);
(*jvm_env)->DeleteLocalRef (jvm_env, o_ocitem);
@@
-2437,7
+2436,7
@@
static void cjni_callback_info_destroy (void *arg) /* {{{ */
cbi = (cjni_callback_info_t *) arg;
cbi = (cjni_callback_info_t *) arg;
- /* This condition can occur
r
when shutting down. */
+ /* This condition can occur when shutting down. */
if (jvm == NULL)
{
sfree (cbi);
if (jvm == NULL)
{
sfree (cbi);
@@
-3080,9
+3079,8
@@
static int cjni_init (void) /* {{{ */
if (config_block != NULL)
{
if (config_block != NULL)
{
- int status;
-
status =
cjni_config_perform (config_block);
+ cjni_config_perform (config_block);
oconfig_free (config_block);
config_block = NULL;
}
oconfig_free (config_block);
config_block = NULL;
}