Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-ipsec.c:829

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

esp_sa_remove_white

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ipsec.c)expand/collapse
Show more  
 816  esp_sa_remove_white(const gchar *sa, gchar **sa_bis)
 817  {
 818    guint i = 0;
 819    guint cpt = 0;
 820    gchar *sa_tmp;
 821   
 822    if((sa == NULL) || (strcmp(sa, "") == 0))
 823      {
 824        *sa_bis = NULL;
 825        return;
 826      }
 827   
 828    sa_tmp = ep_alloc(strlen(sa) + 1);
 829    for(i = 0; i < strlen(sa); i++)
 830      {
 831   
 832        if((sa[i] != ' ') && (sa[i] != '\t'))
 833          {
 834            sa_tmp[cpt] = sa[i];
 835            cpt ++;
 836          }
 837      }
 838    sa_tmp[cpt] = '\0';
 839   
 840    /* XXX - Should this be se_allocated instead? */
 841    *sa_bis = (gchar *)g_malloc((cpt +1) * sizeof(gchar));
 842    memcpy(*sa_bis,sa_tmp,cpt);
 843    (*sa_bis)[cpt] = '\0';
 844  }
Show more  




Change Warning 2691.30225 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: