Skip to content
  • Markus Armbruster's avatar
    b6b71cb5
    memory: Clean up how mtree_info() prints · b6b71cb5
    Markus Armbruster authored
    
    
    mtree_info() takes an fprintf()-like callback and a FILE * to pass to
    it, and so do its helper functions.  Passing around callback and
    argument is rather tiresome.
    
    Its only caller hmp_info_mtree() passes monitor_printf() cast to
    fprintf_function and the current monitor cast to FILE *.
    
    The type-punning is technically undefined behaviour, but works in
    practice.  Clean up: drop the callback, and call qemu_printf()
    instead.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Message-Id: <20190417191805.28198-9-armbru@redhat.com>
    b6b71cb5
    memory: Clean up how mtree_info() prints
    Markus Armbruster authored
    
    
    mtree_info() takes an fprintf()-like callback and a FILE * to pass to
    it, and so do its helper functions.  Passing around callback and
    argument is rather tiresome.
    
    Its only caller hmp_info_mtree() passes monitor_printf() cast to
    fprintf_function and the current monitor cast to FILE *.
    
    The type-punning is technically undefined behaviour, but works in
    practice.  Clean up: drop the callback, and call qemu_printf()
    instead.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Message-Id: <20190417191805.28198-9-armbru@redhat.com>
Loading