Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at cosine.c:517

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

parse_single_hex_dump_line

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/cosine.c)expand/collapse
Show more  
 504  parse_single_hex_dump_line(char* rec, guint8 *buf, guint byte_offset)
 505  {
 506          int num_items_scanned, i;
 507          unsigned int bytes[16];
 508   
 509          num_items_scanned = sscanf(rec, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
 510                                 &bytes[0], &bytes[1], &bytes[2], &bytes[3],
 511                                 &bytes[4], &bytes[5], &bytes[6], &bytes[7],
 512                                 &bytes[8], &bytes[9], &bytes[10], &bytes[11],
 513                                 &bytes[12], &bytes[13], &bytes[14], &bytes[15]);
 514          if (num_items_scanned == 0)
 515                  return -1;
 516   
 517          if (num_items_scanned > 16)
 518                  num_items_scanned = 16;
 519   
 520          for (i=0; i<num_items_scanned; i++) {
 521                  buf[byte_offset + i] = (guint8)bytes[i];
 522          }
 523   
 524          return num_items_scanned;
 525  }
Show more  




Change Warning 986.29945 : Redundant Condition

Because they are very similar, this warning shares annotations with warning 986.29948.

Priority:
State:
Finding:
Owner:
Note: