Skip to content

Commit 73f6d36

Browse files
committed
fix build warnings
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) { ~~ ~~~~^~~~~
1 parent 8e1059b commit 73f6d36

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libsofia-sip-ua/nua/nua.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ su_log_t nua_log[] = { SU_LOG_INIT("nua", "NUA_DEBUG", SU_DEBUG) };
8989
* @param root Pointer to a root object
9090
* @param callback Pointer to event callback function
9191
* @param magic Pointer to callback context
92-
* @param tag, value, ... List of tagged parameters
92+
* @param tag,value,... List of tagged parameters
9393
*
9494
* @retval !=NULL a pointer to a @nua stack object
9595
* @retval NULL upon an error
@@ -1098,7 +1098,7 @@ nua_handle_t *nua_handle_by_call_id(nua_t *nua, const char *call_id)
10981098
/** Get leg from dialog. */
10991099
const nta_leg_t *nua_get_dialog_state_leg(nua_handle_t *nh)
11001100
{
1101-
if (nh && nh->nh_ds)
1101+
if (nh)
11021102
return nh->nh_ds->ds_leg;
11031103
else
11041104
return NULL;
@@ -1107,7 +1107,7 @@ const nta_leg_t *nua_get_dialog_state_leg(nua_handle_t *nh)
11071107
/** Get su_home_t from nua handle. */
11081108
su_home_t *nua_handle_get_home(nua_handle_t *nh)
11091109
{
1110-
if (nh && nh->nh_home)
1110+
if (nh)
11111111
return nh->nh_home;
11121112
else
11131113
return NULL;
@@ -1116,7 +1116,7 @@ su_home_t *nua_handle_get_home(nua_handle_t *nh)
11161116
/** Get su_home_t from nua. */
11171117
su_home_t *nua_get_home(nua_t *nua)
11181118
{
1119-
if (nua && nua->nua_home)
1119+
if (nua)
11201120
return nua->nua_home;
11211121
else
11221122
return NULL;
@@ -1147,7 +1147,7 @@ unsigned nua_handle_is_destroyed(nua_handle_t *nh)
11471147

11481148
void nua_handle_dialog_usage_set_refresh_range(nua_handle_t *nh,
11491149
unsigned min, unsigned max) {
1150-
if (nh && nh->nh_ds && nh->nh_ds->ds_usage) {
1150+
if (nh && nh->nh_ds->ds_usage) {
11511151
nua_dialog_usage_set_refresh_range(nh->nh_ds->ds_usage, min, max);
11521152
}
11531153
}

0 commit comments

Comments
 (0)