Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-radius.c:1777

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

radius_register_avp_dissector

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-radius.c)expand/collapse
Show more  
 1762  extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_id, radius_avp_dissector_t radius_avp_dissector) {
 1763          radius_vendor_info_t* vendor;
 1764          radius_attr_info_t* dictionary_entry;
 1765          GHashTable* by_id;
 1766   
 1767          DISSECTOR_ASSERT(radius_avp_dissector != NULL);
 1768   
 1769          if (vendor_id) {
 1770                  vendor = g_hash_table_lookup(dict->vendors_by_id,GUINT_TO_POINTER(vendor_id));
 1771   
 1772                  if ( ! vendor ) {
 1773                          vendor = g_malloc(sizeof(radius_vendor_info_t));
 1774   
 1775                          vendor->name = g_strdup_printf("%s-%u",val_to_str(vendor_id, sminmpec_values, "Unknown"),vendor_id);
 1776                          vendor->code = vendor_id;
 1777                          vendor->attrs_by_id = g_hash_table_new(g_direct_hash,g_direct_equal);
 1778                          vendor->ett = no_vendor.ett;
 1779   
 1780                          g_hash_table_insert(dict->vendors_by_id,GUINT_TO_POINTER(vendor->code),vendor);
 1781                          g_hash_table_insert(dict->vendors_by_name,(gpointer)(vendor->name),vendor);
 1782                  }
 1783   
 1784                  dictionary_entry = g_hash_table_lookup(vendor->attrs_by_id,GUINT_TO_POINTER(attribute_id));
 1785                  by_id = vendor->attrs_by_id;
 1786          } else {
 1787                  dictionary_entry = g_hash_table_lookup(dict->attrs_by_id,GUINT_TO_POINTER(attribute_id));
 1788                  by_id = dict->attrs_by_id;
 1789          }
 1790   
 1791          if (!dictionary_entry) {
 1792                  dictionary_entry = g_malloc(sizeof(radius_attr_info_t));;
 1793   
 1794                  dictionary_entry->name = g_strdup_printf("Unknown-Attribute-%u",attribute_id);
 1795                  dictionary_entry->code = attribute_id;
 1796                  dictionary_entry->encrypt = FALSE;
 1797                  dictionary_entry->type = NULL;
 1798                  dictionary_entry->vs = NULL;
 1799                  dictionary_entry->hf = no_dictionary_entry.hf;
 1800                  dictionary_entry->tagged = 0;
 1801                  dictionary_entry->hf_tag = -1;
 1802                  dictionary_entry->hf_len = no_dictionary_entry.hf_len;
 1803                  dictionary_entry->ett = no_dictionary_entry.ett;
 1804   
 1805                  g_hash_table_insert(by_id,GUINT_TO_POINTER(dictionary_entry->code),dictionary_entry);
 1806          }
 1807   
 1808          dictionary_entry->dissector = radius_avp_dissector;
 1809   
 1810  }
Show more  




Change Warning 12287.30544 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: