Use C99-style for-loops, much more readable.

This commit is contained in:
Luca Longinotti 2013-06-14 18:14:53 +02:00
parent 3d939da41f
commit 58a2494e4c
4 changed files with 4 additions and 8 deletions

View File

@ -18,8 +18,7 @@ jobjectArray wrapEndpointDescriptors(JNIEnv *env, int count,
jobjectArray array = (jobjectArray) (*env)->NewObjectArray(env, count,
(*env)->FindClass(env, PACKAGE_DIR"/EndpointDescriptor"), NULL);
int i;
for (i = 0; i < count; i++)
for (int i = 0; i < count; i++)
(*env)->SetObjectArrayElement(env, array, i,
wrapEndpointDescriptor(env, &descriptors[i]));

View File

@ -17,8 +17,7 @@ jobjectArray wrapInterfaces(JNIEnv *env, int count,
jobjectArray array = (jobjectArray) (*env)->NewObjectArray(env, count,
(*env)->FindClass(env, PACKAGE_DIR"/Interface"), NULL);
int i;
for (i = 0; i < count; i++)
for (int i = 0; i < count; i++)
(*env)->SetObjectArrayElement(env, array, i,
wrapInterface(env, &interfaces[i]));

View File

@ -20,8 +20,7 @@ jobjectArray wrapInterfaceDescriptors(JNIEnv *env, int count,
jobjectArray array = (jobjectArray) (*env)->NewObjectArray(env, count,
(*env)->FindClass(env, PACKAGE_DIR"/InterfaceDescriptor"), NULL);
int i;
for (i = 0; i < count; i++)
for (int i = 0; i < count; i++)
(*env)->SetObjectArrayElement(env, array, i,
wrapInterfaceDescriptor(env, &descriptors[i]));

View File

@ -13,8 +13,7 @@ jobjectArray wrapIsoPacketDescriptors(JNIEnv *env, int count,
jobjectArray array = (jobjectArray) (*env)->NewObjectArray(env, count,
(*env)->FindClass(env, PACKAGE_DIR"/IsoPacketDescriptor"), NULL);
int i;
for (i = 0; i < count; i++)
for (int i = 0; i < count; i++)
(*env)->SetObjectArrayElement(env, array, i,
wrapIsoPacketDescriptor(env, &descriptors[i]));