From a5fd50f33a261b9e3159e2c2708aa3402db78fc7 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Mon, 22 Jun 2015 02:59:23 +0000 Subject: Re #1843 (misc): Fixed warning: address of struct will always evaluate to 'true' [-Wpointer-bool-conversion] git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5113 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/src/pjlib-util/cli_console.c | 4 ++-- pjlib-util/src/pjlib-util/cli_telnet.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pjlib-util') diff --git a/pjlib-util/src/pjlib-util/cli_console.c b/pjlib-util/src/pjlib-util/cli_console.c index cac87415..5f5528f7 100644 --- a/pjlib-util/src/pjlib-util/cli_console.c +++ b/pjlib-util/src/pjlib-util/cli_console.c @@ -285,7 +285,7 @@ static void send_ambi_arg(pj_cli_sess *sess, pj_strcat2(&send_data, "^"); /* Get the max length of the command name */ for (i=0;ihint_cnt;++i) { - if ((&hint[i].type) && (hint[i].type.slen > 0)) { + if (hint[i].type.slen > 0) { if (pj_stricmp(&hint[i].type, &sc_type) == 0) { if ((i > 0) && (!pj_stricmp(&hint[i-1].desc, &hint[i].desc))) { cmd_length += (hint[i].name.slen + 3); @@ -306,7 +306,7 @@ static void send_ambi_arg(pj_cli_sess *sess, cmd_length = 0; for (i=0;ihint_cnt;++i) { - if ((&hint[i].type) && (hint[i].type.slen > 0)) { + if (hint[i].type.slen > 0) { if (pj_stricmp(&hint[i].type, &sc_type) == 0) { parse_state = OP_SHORTCUT; } else if (pj_stricmp(&hint[i].type, &choice_type) == 0) { diff --git a/pjlib-util/src/pjlib-util/cli_telnet.c b/pjlib-util/src/pjlib-util/cli_telnet.c index 0ea53816..b53edcad 100644 --- a/pjlib-util/src/pjlib-util/cli_telnet.c +++ b/pjlib-util/src/pjlib-util/cli_telnet.c @@ -785,7 +785,7 @@ static void send_ambi_arg(cli_telnet_sess *sess, pj_strcat2(&send_data, "^"); /* Get the max length of the command name */ for (i=0;ihint_cnt;++i) { - if ((&hint[i].type) && (hint[i].type.slen > 0)) { + if (hint[i].type.slen > 0) { if (pj_stricmp(&hint[i].type, &sc_type) == 0) { if ((i > 0) && (!pj_stricmp(&hint[i-1].desc, &hint[i].desc))) { cmd_length += (hint[i].name.slen + 3); @@ -807,7 +807,7 @@ static void send_ambi_arg(cli_telnet_sess *sess, cmd_length = 0; /* Build hint information */ for (i=0;ihint_cnt;++i) { - if ((&hint[i].type) && (hint[i].type.slen > 0)) { + if (hint[i].type.slen > 0) { if (pj_stricmp(&hint[i].type, &sc_type) == 0) { parse_state = OP_SHORTCUT; } else if (pj_stricmp(&hint[i].type, &choice_type) == 0) { -- cgit v1.2.3