aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2019-01-02 23:59:41 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-01-03 14:04:23 +0000
commit19d787d0514696eff4b723d23c7615155c23b245 (patch)
tree860ee88fb9209d3e9854aec3a9aa2c3d1e4ec76e
parent7c788fd459df3b8f87c6a50698c125f15b229772 (diff)
json_dumper: make json_dumper_bad fatal.
A call to this function means a programming error. g_error makes it fatal and terminates the program, making the debug easier. Change-Id: I5c9e82507482733b4d450ed6c3a9fc17fb0fcdca Reviewed-on: https://code.wireshark.org/review/31310 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r--wsutil/json_dumper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsutil/json_dumper.c b/wsutil/json_dumper.c
index 43db64ec64..c3ca01a86c 100644
--- a/wsutil/json_dumper.c
+++ b/wsutil/json_dumper.c
@@ -95,7 +95,7 @@ json_dumper_bad(json_dumper *dumper, enum json_dumper_change change,
/* Console output can be slow, disable log calls to speed up fuzzing. */
return;
}
- g_warning("Bad json_dumper state: %s; change=%d type=%d depth=%d prev/curr/next state=%02x %02x %02x",
+ g_error("Bad json_dumper state: %s; change=%d type=%d depth=%d prev/curr/next state=%02x %02x %02x",
what, change, type, dumper->current_depth, states[0], states[1], states[2]);
}