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/uat_load.l | |
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/uat_load.l')
-rw-r--r-- | epan/uat_load.l | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/epan/uat_load.l b/epan/uat_load.l index b9e8ee9a23..43452fc701 100644 --- a/epan/uat_load.l +++ b/epan/uat_load.l @@ -249,12 +249,11 @@ comment #[^\n]*\n rec = uat_add_record(uat, record, valid_record); - if ((uat->update_cb) && (rec != NULL)) - uat->update_cb(rec,&err); - - if (err) { - error = err; - yyterminate(); + if ((uat->update_cb) && (rec != NULL)) { + if (!uat->update_cb(rec,&err)) { + error = err; + yyterminate(); + } } valid_record = TRUE; |