[Libosinfo] [osinfo-db-tools] Fix build with clang

Daniel P. Berrange berrange at redhat.com
Tue Apr 18 10:28:49 UTC 2017


On Sun, Apr 16, 2017 at 04:26:15PM +0400, Roman Bogorodskiy wrote:
> The osinfo_db_import_create_reg() function implements error handling
> via jumping to cleanup and returning, however, this way the return
> value is not initialised. This breaks build with clang and probably
> could lead to an undefined behavior for users of this function.
> 
> Fix by initialising ret with -1 by default.
> ---
>  tools/osinfo-db-import.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK & pushed.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|




More information about the Libosinfo mailing list