Text   |  XML   |  ReML   |   Visible Warnings:

Null Test After Dereference  at lemon.c:1657

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

merge

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tools/lemon/lemon.c)expand/collapse
Show more  
 1628  static char *merge(char *a, char *b, int (*cmp)(const void *, const void *),
 1629      int offset)
 1630  {
 1631    char *ptr, *head;
 1632   
 1633    if( a==0 ){
 1634      head = b;
 1635    }else if( b==0 ){
 1636      head = a;
 1637    }else{
 1638      if( (*cmp)(a,b)<0 ){
 1639        ptr = a;
 1640        a = NEXT(a);
 1641      }else{
 1642        ptr = b;
 1643        b = NEXT(b);
 1644      }
 1645      head = ptr;
 1646      while( a && b ){
 1647        if( (*cmp)(a,b)<0 ){
 1648          NEXT(ptr) = a;
 1649          ptr = a;
 1650          a = NEXT(a);
 1651        }else{
 1652          NEXT(ptr) = b;
 1653          ptr = b;
 1654          b = NEXT(b);
 1655        }
 1656      }
 1657      if( a ) NEXT(ptr) = a;
 1658      else    NEXT(ptr) = b;
 1659    }
 1660    return head;
 1661  }
Show more  




Change Warning 12243.29264 : Null Test After Dereference

Priority:
State:
Finding:
Owner:
Note: