]> git.ipfire.org Git - thirdparty/libvirt.git/commit
absolutePathFromBaseFile: avoid an unnecessary use of assert
authorJim Meyering <meyering@redhat.com>
Wed, 10 Feb 2010 10:54:24 +0000 (11:54 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 10 Feb 2010 11:30:09 +0000 (12:30 +0100)
commite3042683bdebc3aa882d48d8bcab53cf870dc990
treeef13622ba47bed958deac8b3b0d913da6fafc725
parent69cf62adacdf463ef6b47cdc267b37d65c8670dd
absolutePathFromBaseFile: avoid an unnecessary use of assert

* src/util/storage_file.c (absolutePathFromBaseFile): While this use
of virAsprintf is slightly cleaner than using stpncpy(stpcpy(...,
it does impose an artificial limitation on the length of the base_file
name.  Rather than asserting that it does not exceed INT_MAX, return
NULL when it does.
src/util/storage_file.c