Skip to content

Commit

Permalink
fix build warnings
Browse files Browse the repository at this point in the history
nua.c:1101:16: warning: address of array 'nh->nh_ds' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (nh && nh->nh_ds)
               ~~ ~~~~^~~~~
nua.c:1110:16: warning: address of array 'nh->nh_home' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (nh && nh->nh_home)
               ~~ ~~~~^~~~~~~
nua.c:1119:18: warning: address of array 'nua->nua_home' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (nua && nua->nua_home)
                ~~ ~~~~~^~~~~~~~
nua.c:1150:16: warning: address of array 'nh->nh_ds' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (nh && nh->nh_ds && nh->nh_ds->ds_usage) {
               ~~ ~~~~^~~~~
  • Loading branch information
seven1240 committed Sep 15, 2021
1 parent 8e1059b commit 2e86c5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libsofia-sip-ua/nua/nua.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ su_log_t nua_log[] = { SU_LOG_INIT("nua", "NUA_DEBUG", SU_DEBUG) };
* @param root Pointer to a root object
* @param callback Pointer to event callback function
* @param magic Pointer to callback context
* @param tag, value, ... List of tagged parameters
* @param tag, value, ... List of tagged parameters
*
* @retval !=NULL a pointer to a @nua stack object
* @retval NULL upon an error
Expand Down Expand Up @@ -1098,7 +1098,7 @@ nua_handle_t *nua_handle_by_call_id(nua_t *nua, const char *call_id)
/** Get leg from dialog. */
const nta_leg_t *nua_get_dialog_state_leg(nua_handle_t *nh)
{
if (nh && nh->nh_ds)
if (nh)
return nh->nh_ds->ds_leg;
else
return NULL;
Expand All @@ -1107,7 +1107,7 @@ const nta_leg_t *nua_get_dialog_state_leg(nua_handle_t *nh)
/** Get su_home_t from nua handle. */
su_home_t *nua_handle_get_home(nua_handle_t *nh)
{
if (nh && nh->nh_home)
if (nh)
return nh->nh_home;
else
return NULL;
Expand All @@ -1116,7 +1116,7 @@ su_home_t *nua_handle_get_home(nua_handle_t *nh)
/** Get su_home_t from nua. */
su_home_t *nua_get_home(nua_t *nua)
{
if (nua && nua->nua_home)
if (nua)
return nua->nua_home;
else
return NULL;
Expand Down Expand Up @@ -1147,7 +1147,7 @@ unsigned nua_handle_is_destroyed(nua_handle_t *nh)

void nua_handle_dialog_usage_set_refresh_range(nua_handle_t *nh,
unsigned min, unsigned max) {
if (nh && nh->nh_ds && nh->nh_ds->ds_usage) {
if (nh && nh->nh_ds->ds_usage) {
nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, min, max);
}
}
Expand Down

0 comments on commit 2e86c5b

Please sign in to comment.