Wireshark-commits: [Wireshark-commits] master 63a3d04: Consistently use the "g_string_free returns

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 13 Jan 2015 23:14:18 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=63a3d043e3f14eebb0798a250d9aecdc8e89dfb9
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

63a3d04 by Guy Harris (guy@xxxxxxxxxxxx):

    Consistently use the "g_string_free returns a C string pointer" idiom.
    
    g_string_free(str, FALSE) frees the GString container but not the
    underlying g_malloc()ed string; instead, it returns a pointer to the
    g_malloc()ed string.
    
    Fix those places that didn't already get the string pointer from
    g_string_free() to do so rather than manually extracting the string
    themselves.
    
    And fix one place that didn't even need to use a string - it was just
    scanning a C string without even modifying it.
    
    Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5
    Reviewed-on: https://code.wireshark.org/review/6532
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  9f5e4fb   uat_load() and uat_save() return a success indication; use it.
    adds  63a3d04   Consistently use the "g_string_free returns a C string pointer" idiom.


Summary of changes:
 capchild/capture_sync.c              |    3 +--
 caputils/airpcap_loader.c            |   17 ++++++-----------
 echld/child.c                        |    5 +----
 echld/common.c                       |    5 +----
 echld/dispatcher.c                   |   10 ++--------
 echld/parent.c                       |    4 +---
 echld_test.c                         |    5 +----
 epan/conversation_table.c            |    6 ++----
 epan/dfilter/dfilter-macro.c         |    6 ++----
 epan/dissectors/packet-xml.c         |    5 +----
 epan/geoip_db.c                      |    5 +----
 epan/oids.c                          |    5 +----
 epan/radius_dict.l                   |    6 ++----
 plugins/mate/mate_util.c             |    6 ++----
 plugins/wimaxasncp/wimaxasncp_dict.l |    3 +--
 ui/gtk/file_import_dlg.c             |   25 +++++++++++++++----------
 ui/gtk/main_menubar.c                |    4 +---
 ui/gtk/packet_win.c                  |    7 +------
 ui/gtk/sctp_assoc_analyse.c          |    3 +--
 ui/gtk/sctp_stat_dlg.c               |    3 +--
 ui/help_url.c                        |    5 +----
 ui/ssl_key_export.c                  |    5 +----
 ui/tap_export_pdu.c                  |   26 +++++++++++++++-----------
 ui/voip_calls.c                      |    3 +--
 wsutil/str_util.c                    |    3 +--
 25 files changed, 63 insertions(+), 112 deletions(-)