[PATCH] lib: fwts_log_xml: wrap up the unclosed tags
Colin Ian King
colin.king at canonical.com
Fri Jun 1 08:51:29 UTC 2012
On 01/06/12 09:19, Keng-Yu Lin wrote:
> wrapping up all the remaining unclosed tags in fwts_log_close_xml().
>
> Signed-off-by: Keng-Yu Lin <kengyu at canonical.com>
> ---
> src/lib/src/fwts_log_xml.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_log_xml.c b/src/lib/src/fwts_log_xml.c
> index 57b530b..0d738e4 100644
> --- a/src/lib/src/fwts_log_xml.c
> +++ b/src/lib/src/fwts_log_xml.c
> @@ -169,7 +169,8 @@ static void fwts_log_open_xml(fwts_log *log)
>
> static void fwts_log_close_xml(fwts_log *log)
> {
> - fwts_log_section_end_xml(log);
> + while (xml_stack_index)
> + fwts_log_section_end_xml(log);
>
> fwrite("\n", 1, 1, log->fp);
> fflush(log->fp);
>
I think that if we need to force pop these off the stack then we've
actually got a bug higher up in the framework, so I think that needs
fixing rather that force popping this stack. If we force pop these off
the stack than the tags aren't going to match in the correct places
anyhow, so... NACK from me.
More information about the fwts-devel
mailing list