1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

lv: set creation uses const string

There is no need to duplicate const string we got and keep
from uname() call.
This commit is contained in:
Zdenek Kabelac 2024-10-21 11:20:12 +02:00
parent b4156bb4de
commit 8fcfac7c89

View File

@ -1568,10 +1568,10 @@ int lv_set_creation(struct logical_volume *lv,
_utsinit = 1; _utsinit = 1;
} }
hostname = _utsname.nodename; lv->hostname = _utsname.nodename;
} } else
lv->hostname = dm_pool_strdup(lv->vg->vgmem, hostname);
lv->hostname = dm_pool_strdup(lv->vg->vgmem, hostname);
lv->timestamp = timestamp ? : (uint64_t) time(NULL); lv->timestamp = timestamp ? : (uint64_t) time(NULL);
return 1; return 1;