summaryrefslogtreecommitdiff
path: root/pjlib-util
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2015-06-22 02:59:23 +0000
committerLiong Sauw Ming <ming@teluu.com>2015-06-22 02:59:23 +0000
commita5fd50f33a261b9e3159e2c2708aa3402db78fc7 (patch)
tree7a726690b5d5e119526cfd7b878a7d314596217d /pjlib-util
parentc0422a30193fd9316c2259a7a28ef18eb39fdcd4 (diff)
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
Diffstat (limited to 'pjlib-util')
-rw-r--r--pjlib-util/src/pjlib-util/cli_console.c4
-rw-r--r--pjlib-util/src/pjlib-util/cli_telnet.c4
2 files changed, 4 insertions, 4 deletions
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;i<info->hint_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;i<info->hint_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;i<info->hint_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;i<info->hint_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) {