aboutsummaryrefslogtreecommitdiffstats
path: root/epan/expert.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-17 16:40:28 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-18 00:41:09 +0000
commit859511db14feae071cc1e6e1889ae39bfd276faa (patch)
treea6ef5501110220c93d583439f5f0257c243cde64 /epan/expert.c
parent3f765b3ef94fd6044279d47d0b30b46c344e5943 (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/expert.c')
-rw-r--r--epan/expert.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/expert.c b/epan/expert.c
index da47c135c7..a5d942a476 100644
--- a/epan/expert.c
+++ b/epan/expert.c
@@ -121,13 +121,15 @@ static GArray *uat_saved_fields = NULL;
UAT_CSTRING_CB_DEF(uat_expert_entries, field, expert_level_entry_t)
UAT_VS_DEF(uat_expert_entries, severity, expert_level_entry_t, guint32, PI_ERROR, "Error")
-static void uat_expert_update_cb(void *r, char **err)
+static gboolean uat_expert_update_cb(void *r, char **err)
{
expert_level_entry_t *rec = (expert_level_entry_t *)r;
if (expert_registrar_get_byname(rec->field) == NULL) {
*err = g_strdup_printf("Expert Info field doesn't exist");
+ return FALSE;
}
+ return TRUE;
}
static void *uat_expert_copy_cb(void *n, const void *o, size_t siz _U_)