[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [[libvirt-glib PATCHv3] 2/3] Don't use g_error in xxx_get_name



On Tue, Jan 31, 2012 at 03:34:10PM +0100, Christophe Fergeau wrote:
> g_error will trigger an abort of the running process so it's not
> desirable to call it in a library. This commit uses g_warning when
> this occurs and returns NULL. libvirt will only return NULL for these
> strings if some kind of memory corruption is going on, or if we are
> using an invalid pointer.
> ---
>  libvirt-gobject/libvirt-gobject-connection.c      |    6 ++++++
>  libvirt-gobject/libvirt-gobject-domain-snapshot.c |    3 ++-
>  libvirt-gobject/libvirt-gobject-domain.c          |    3 ++-
>  libvirt-gobject/libvirt-gobject-interface.c       |    3 ++-
>  libvirt-gobject/libvirt-gobject-network-filter.c  |    3 ++-
>  libvirt-gobject/libvirt-gobject-network.c         |    3 ++-
>  libvirt-gobject/libvirt-gobject-node-device.c     |    3 ++-
>  libvirt-gobject/libvirt-gobject-storage-pool.c    |   13 +++++++++----
>  libvirt-gobject/libvirt-gobject-storage-vol.c     |    3 ++-
>  9 files changed, 29 insertions(+), 11 deletions(-)

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]