X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fjava.c;h=e4b10bebb4f543bb74d3772f0894247c96c38f30;hb=d437681a04278fa6292338b4959231f825652785;hp=b69ca946b301c36a367c114e98666c7b33e69acd;hpb=59c7ee1cafaf53814838794908dd84f8101334c7;p=collectd.git diff --git a/src/java.c b/src/java.c index b69ca946..e4b10beb 100644 --- a/src/java.c +++ b/src/java.c @@ -906,7 +906,7 @@ static jobject ctoj_notification (JNIEnv *jvm_env, /* {{{ */ #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) { @@ -1306,7 +1306,7 @@ static int jtoc_notification (JNIEnv *jvm_env, notification_t *n, /* {{{ */ 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"); @@ -2436,7 +2436,7 @@ static void cjni_callback_info_destroy (void *arg) /* {{{ */ cbi = (cjni_callback_info_t *) arg; - /* This condition can occurr when shutting down. */ + /* This condition can occur when shutting down. */ if (jvm == NULL) { sfree (cbi);