Try to bring up the code to more modern standards by:
- use dynamic GString built xml over a fixed buffer
- use autofree to save on explicit g_free() calls
- don't hand hack strstr to find the delimiter
- fix up style of xml_builtin and invert loop
Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
---
v3
- also clean-up xml_builtin loop
- use strchr and defere copy for only xml case
v2
- avoid needless g_strndup for copy of annex
---
gdbstub/internals.h | 2 +-
gdbstub/gdbstub.c | 81 +++++++++++++++++++++++----------------------
2 files changed, 43 insertions(+), 40 deletions(-)