Changeset 5113 for pjproject/trunk


Ignore:
Timestamp:
Jun 22, 2015 2:59:23 AM (9 years ago)
Author:
ming
Message:

Re #1843 (misc): Fixed warning: address of struct will always evaluate to 'true' [-Wpointer-bool-conversion]

Location:
pjproject/trunk/pjlib-util/src/pjlib-util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/cli_console.c

    r4728 r5113  
    286286    /* Get the max length of the command name */ 
    287287    for (i=0;i<info->hint_cnt;++i) { 
    288         if ((&hint[i].type) && (hint[i].type.slen > 0)) { 
     288        if (hint[i].type.slen > 0) { 
    289289            if (pj_stricmp(&hint[i].type, &sc_type) == 0) { 
    290290                if ((i > 0) && (!pj_stricmp(&hint[i-1].desc, &hint[i].desc))) { 
     
    307307    cmd_length = 0; 
    308308    for (i=0;i<info->hint_cnt;++i) { 
    309         if ((&hint[i].type) && (hint[i].type.slen > 0)) { 
     309        if (hint[i].type.slen > 0) { 
    310310            if (pj_stricmp(&hint[i].type, &sc_type) == 0) { 
    311311                parse_state = OP_SHORTCUT; 
  • pjproject/trunk/pjlib-util/src/pjlib-util/cli_telnet.c

    r4728 r5113  
    786786    /* Get the max length of the command name */ 
    787787    for (i=0;i<info->hint_cnt;++i) { 
    788         if ((&hint[i].type) && (hint[i].type.slen > 0)) { 
     788        if (hint[i].type.slen > 0) { 
    789789            if (pj_stricmp(&hint[i].type, &sc_type) == 0) { 
    790790                if ((i > 0) && (!pj_stricmp(&hint[i-1].desc, &hint[i].desc))) { 
     
    808808    /* Build hint information */ 
    809809    for (i=0;i<info->hint_cnt;++i) { 
    810         if ((&hint[i].type) && (hint[i].type.slen > 0)) { 
     810        if (hint[i].type.slen > 0) { 
    811811            if (pj_stricmp(&hint[i].type, &sc_type) == 0) { 
    812812                parse_state = OP_SHORTCUT; 
Note: See TracChangeset for help on using the changeset viewer.