This commit is contained in:
Philippe Teuwen 2021-05-09 23:37:34 +02:00
commit 75328a34b6
2 changed files with 4 additions and 3 deletions

View file

@ -77,7 +77,7 @@ static int em4x70_receive(uint8_t *bits, size_t length);
static bool find_listen_window(bool command); static bool find_listen_window(bool command);
static void init_tag(void) { static void init_tag(void) {
memset(tag.data, 0x00, sizeof(tag.data) / sizeof(tag.data[0])); memset(tag.data, 0x00, ARRAYLEN(tag.data));
} }
static void em4x70_setup_read(void) { static void em4x70_setup_read(void) {

View file

@ -25,6 +25,7 @@
#include "whereami.h" #include "whereami.h"
#include "comms.h" #include "comms.h"
#include "fileutils.h" #include "fileutils.h"
#include "commonutil.h" // ARRAYLEN
#include "jni_tools.h" #include "jni_tools.h"
//iceman, todo: proxify socker server name. Maybe set in preferences? //iceman, todo: proxify socker server name. Maybe set in preferences?
@ -151,13 +152,13 @@ JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) {
{"closePm3", "()V", ClosePm3} {"closePm3", "()V", ClosePm3}
}; };
if ((*jniEnv)->RegisterNatives(jniEnv, clazz, methods, sizeof(methods) / sizeof(methods[0])) != if ((*jniEnv)->RegisterNatives(jniEnv, clazz, methods, ARRAYLEN(methods)) !=
JNI_OK) { JNI_OK) {
return -1; return -1;
} }
if ((*jniEnv)->RegisterNatives(jniEnv, clz_test, methods1, if ((*jniEnv)->RegisterNatives(jniEnv, clz_test, methods1,
sizeof(methods1) / sizeof(methods1[0])) != JNI_OK) { ARRAYLEN(methods1)) != JNI_OK) {
return -1; return -1;
} }