Wireshark-commits: [Wireshark-commits] master 3aee917: wiretap: remove unused code, drop number_of_

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 17 May 2014 12:41:51 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3aee917058fb46b2e86d750766001c4db214fc78
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

3aee917 by Peter Wu (peter@xxxxxxxxxxxxx):

    wiretap: remove unused code, drop number_of_interfaces
    
    While investigating an ASAN issue (fixed in
    commit dcdd076ab0965c346efe90051678ba790eaf7a02), I got greatly confused
    by three different types having the same "interface_data" field name:
    
     * pcapng_t *pn stores an array of interface_data_t objects.
     * wtap *wth stores an array of wtapng_if_descr_t objects.
     * pcapng_dump_t should store an array of interface_data_t objects.
    
    pcapng_dump_t and friends are unused since
    commit c7f1a431d23e17a15777652b1252e139f182b0e6, so drop it.
    
    To fix the confusion, rename the interface_data_t type to
    interface_info_t type and use the local variable "iface_info"
    everywhere. Rename interface_data of pcapng_t to "interfaces" and
    add a comment what this exactly means (interfaces listed in the capture
    file).
    
    Drop the number_of_interfaces field for interfaces as the array
    length is already available from GArray. Now interface_data is always
    initialized for wth (which also gets copied to idb).
    
    s/int/guint/g and replace cast at some places.
    
    There are no regressions for the in-tree test suite.
    
    Change-Id: I2d5985c9f1e43f8230dbb4a73bd1e243c4858170
    Reviewed-on: https://code.wireshark.org/review/1656
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Tested-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  9fe221a   Fix newly optimized strdup_vprintf.
    adds  3aee917   wiretap: remove unused code, drop number_of_interfaces


Summary of changes:
 cfile.c                  |    2 +-
 file.c                   |    6 +-
 summary.c                |    2 +-
 tshark.c                 |    2 +-
 ui/gtk/file_import_dlg.c |    1 -
 ui/tap_export_pdu.c      |    1 -
 wiretap/erf.c            |    5 --
 wiretap/file_access.c    |   12 +--
 wiretap/pcapng.c         |  207 ++++++++++++----------------------------------
 wiretap/wtap-int.h       |    1 -
 wiretap/wtap.c           |   13 ++-
 wiretap/wtap.h           |    1 -
 12 files changed, 70 insertions(+), 183 deletions(-)