1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

virStorageBackendFileSystemMount: prefer strdup over virAsprintf

* src/storage/storage_backend_fs.c (virStorageBackendFileSystemMount):
Use virAsprintf only when needed.  In this case, strdup works fine.
This commit is contained in:
Jim Meyering 2010-04-14 10:03:03 +02:00
parent 5cff81b147
commit 50bf3101a3

View File

@ -376,7 +376,7 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool) {
if (pool->def->type == VIR_STORAGE_POOL_NETFS) {
if (pool->def->source.format == VIR_STORAGE_POOL_NETFS_GLUSTERFS) {
if (virAsprintf(&options, "direct-io-mode=1") == -1) {
if ((options = strdup("direct-io-mode=1")) == NULL) {
virReportOOMError();
return -1;
}