Fix compiler warnings

This commit is contained in:
Romain Vimont (®om) 2013-07-20 23:23:48 +02:00 committed by Jeremy Lakeman
parent 6783656179
commit ff0c7ad9cb

View File

@ -256,7 +256,7 @@ Java_org_servalproject_servald_mdp_MeshSocket__1send(JNIEnv * env,
/* Fill mdp structure. */
mdp.packetTypeAndFlags = MDP_TX | flags & MDP_FLAG_MASK;
mdp.packetTypeAndFlags = MDP_TX | (flags & MDP_FLAG_MASK);
mdp.out.queue = qos;
mdp.out.src.port = localport;
if (localsid != NULL) {
@ -313,7 +313,7 @@ Java_org_servalproject_servald_mdp_MeshSocket__1receive(JNIEnv * env,
length = (*env)->GetIntField(env, mdppack, f_meshpacket_length);
/* Receive data. */
if (res = (overlay_mdp_recv(fd, &mdp, localport, &ttl))) {
if ((res = (overlay_mdp_recv(fd, &mdp, localport, &ttl)))) {
if (res == -2) {
/* Socket is closed. */
msg = "Socket closed";