diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-02-17 16:40:28 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-02-18 00:41:09 +0000 |
commit | 859511db14feae071cc1e6e1889ae39bfd276faa (patch) | |
tree | a6ef5501110220c93d583439f5f0257c243cde64 /epan/dissectors/packet-lbmpdmtcp.c | |
parent | 3f765b3ef94fd6044279d47d0b30b46c344e5943 (diff) |
Make UAT record update callbacks return a success/failure indication.
Have them return TRUE on success and FALSE on failure. Check the return
value rather than whether the error string pointer is null or not.
Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-lbmpdmtcp.c')
-rw-r--r-- | epan/dissectors/packet-lbmpdmtcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lbmpdmtcp.c b/epan/dissectors/packet-lbmpdmtcp.c index ae93f69499..94f3172845 100644 --- a/epan/dissectors/packet-lbmpdmtcp.c +++ b/epan/dissectors/packet-lbmpdmtcp.c @@ -153,13 +153,14 @@ static uat_field_t lbmpdm_tcp_tag_array[] = /*----------------------------------------------------------------------------*/ /* UAT callback functions. */ /*----------------------------------------------------------------------------*/ -static void lbmpdm_tcp_tag_update_cb(void * record, char * * error_string) +static gboolean lbmpdm_tcp_tag_update_cb(void * record, char * * error_string) { lbmpdm_tcp_tag_entry_t * tag = (lbmpdm_tcp_tag_entry_t *)record; if (tag->name == NULL) { *error_string = g_strdup_printf("Tag name can't be empty"); + return FALSE; } else { @@ -167,8 +168,10 @@ static void lbmpdm_tcp_tag_update_cb(void * record, char * * error_string) if (tag->name[0] == 0) { *error_string = g_strdup_printf("Tag name can't be empty"); + return FALSE; } } + return TRUE; } static void * lbmpdm_tcp_tag_copy_cb(void * destination, const void * source, size_t length _U_) |