On Tue, Feb 16, 2016 at 02:46:15PM +0800, Fam Zheng wrote: > On Wed, 12/09 10:42, Peter Xu wrote: > > + > > +void hmp_info_dump(Monitor *mon, const QDict *qdict) > > +{ > > + DumpQueryResult *result = qmp_query_dump(NULL); > > If something goes wrong, it is probably better to pass in local_err to > qmp_query_dump and print the error info instead of assuming result's fields > are > all valid and trying to interpret them. > > Fam
This is because qmp_query_dump() will never fail, and it's not using errp. Will assert "result" too before use. Thanks. Peter