Wireshark-commits: [Wireshark-commits] master c83169f: Only set err_info on an error, and use g_str

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 8 Oct 2014 21:13:18 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c83169f343c9a1b7ebbc98badf0d351ef406730e
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c83169f by Guy Harris (guy@xxxxxxxxxxxx):

    Only set err_info on an error, and use g_strdup_printf().
    
    If the goal is to look like a libwiretap routine, we only need to set
    *err_info on an error, and we should set it to a g_mallocated string (or
    NULL).
    
    Handle WTAP_ERR_UNSUPPORTED while we're at it - we never return it, but
    we never return WTAP_ERR_UNSUPPORTED_ENCAP, either, but we handle it.
    
    Change-Id: I9d93c43278d22f0fa77ec1cf7f29b476c8dd0dd0
    Reviewed-on: https://code.wireshark.org/review/4565
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  dbf8024   No need to set *err_info if there's no error.
    adds  c83169f   Only set err_info on an error, and use g_strdup_printf().


Summary of changes:
 rawshark.c |   22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)