Wireshark-commits: [Wireshark-commits] master bc23f79: UAT error string pointers should not be cons
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 13 Jan 2015 20:20:08 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=bc23f797296582d5aca5029dd34244de41ff8605
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

bc23f79 by Guy Harris (guy@xxxxxxxxxxxx):

    UAT error string pointers should not be const pointers.
    
    UAT error strings are usually allocated by g_strdup() or
    g_strdup_printf(), and must ultimately be freed by the caller.
    
    Make the pointer-to-error-string-pointer arguments to various functions
    be "char **", not "const char **".
    
    Fix cases that finds where a raw string was being used, as that won't
    work if you try to free it; g_strdup() it instead.
    
    Add a missing free of an error string.
    
    Remove some no-longer-necessary casts.
    
    Remove some unnecessary g_strdup()s (the string being handed to it was
    already g_malloc()ated).
    
    Change some variable declarations to match.
    
    Put in XXX comments for some cases where the error string is just freed,
    without being shown to the user.
    
    Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
    Reviewed-on: https://code.wireshark.org/review/6525
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  a988253   CMake: Copy libwireshark dependent DLLs to the target directory.
    adds  bc23f79   UAT error string pointers should not be const pointers.


Summary of changes:
 asn1/c1222/packet-c1222-template.c     |    2 +-
 asn1/ldap/packet-ldap-template.c       |    2 +-
 asn1/snmp/packet-snmp-template.c       |    2 +-
 epan/dfilter/dfilter-macro.c           |    4 ++--
 epan/dissectors/packet-bootp.c         |    2 +-
 epan/dissectors/packet-c1222.c         |    2 +-
 epan/dissectors/packet-devicenet.c     |    2 +-
 epan/dissectors/packet-http.c          |    2 +-
 epan/dissectors/packet-ieee80211.c     |    2 +-
 epan/dissectors/packet-ieee802154.c    |    2 +-
 epan/dissectors/packet-imf.c           |    2 +-
 epan/dissectors/packet-ipsec.c         |    2 +-
 epan/dissectors/packet-isakmp.c        |    4 ++--
 epan/dissectors/packet-k12.c           |    4 ++--
 epan/dissectors/packet-lbm.h           |    6 +++---
 epan/dissectors/packet-lbmpdmtcp.c     |    2 +-
 epan/dissectors/packet-lbmr.c          |    2 +-
 epan/dissectors/packet-lbtrm.c         |    2 +-
 epan/dissectors/packet-lbtru.c         |    2 +-
 epan/dissectors/packet-lbttcp.c        |    2 +-
 epan/dissectors/packet-ldap.c          |    2 +-
 epan/dissectors/packet-pdcp-lte.c      |    2 +-
 epan/dissectors/packet-sccp.c          |    2 +-
 epan/dissectors/packet-sctp.c          |    2 +-
 epan/dissectors/packet-snmp.c          |    2 +-
 epan/dissectors/packet-ssl-utils.c     |   10 +++++-----
 epan/dissectors/packet-ssl-utils.h     |   10 +++++-----
 epan/dissectors/packet-vcdu.c          |    2 +-
 epan/dissectors/packet-zbee-nwk-gp.c   |    2 +-
 epan/dissectors/packet-zbee-security.c |    2 +-
 epan/expert.c                          |    2 +-
 epan/uat.c                             |   16 ++++++++--------
 epan/uat.h                             |   24 +++++++++++++-----------
 epan/uat_load.l                        |   11 ++++++-----
 plugins/stats_tree/pinfo_stats_tree.c  |    2 +-
 ui/gtk/uat_gui.c                       |    4 ++--
 ui/qt/uat_dialog.cpp                   |   10 ++++++----
 37 files changed, 80 insertions(+), 75 deletions(-)