Skip to content

Commit

Permalink
app_java: fix compiler warning
Browse files Browse the repository at this point in the history
> java_msgobj.c:233:80: warning: comparison of array 'msg->add_to_branch_s' equal to a null pointer is always false [-Wtautological-pointer-compare]
>     jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0 || msg->add_to_branch_s == NULL) ? "" : strdup(msg->add_to_branch_s));
>                                                                           ~~~~~^~~~~~~~~~~~~~~    ~~~~
> 1 warning generated.

(cherry picked from commit 44d1722)
  • Loading branch information
linuxmaniac authored and miconda committed Jun 27, 2016
1 parent a0fa55b commit a60ba55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/app_java/java_msgobj.c
Expand Up @@ -230,7 +230,7 @@ jobject *fill_sipmsg_object(JNIEnv *env, struct sip_msg *msg)
LM_ERR("%s: Can't find symbol org.siprouter.SipMsg.add_to_branch_s\n", APP_NAME);
return NULL;
}
jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0 || msg->add_to_branch_s == NULL) ? "" : strdup(msg->add_to_branch_s));
jStrParam = (*env)->NewStringUTF(env, (msg->add_to_branch_len <= 0) ? "" : strdup(msg->add_to_branch_s));
(*env)->SetObjectField(env, SipMsgInstance, fid, jStrParam);
if ((*env)->ExceptionCheck(env))
{
Expand Down

0 comments on commit a60ba55

Please sign in to comment.