dump_xenstore_metrics: Refactor this function.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 16 Jan 2012 12:10:37 +0000 (12:10 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 16 Jan 2012 12:10:37 +0000 (12:10 +0000)
commit30ab9c8a80ddf113c66a760ac38f03d4781afebc
treeca09bc4062110a383e21c1dbb1747318ad65f8e4
parent667952366e9c3f7b28aca6a113fc04ebe6bfe2a4
dump_xenstore_metrics: Refactor this function.

Multiple fixes in this function:
 - use 'ret' as intended -- to set the return code
 - jump to 'out' label on error paths
 - you don't need to test if a variable is not NULL before calling free
 - fp == stdout, not stderr, so we don't close stdout(!)
 - formatting
libmetrics/libmetrics.c