mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: always sure we end with '0'
Use easier dm_strncpy().
This commit is contained in:
parent
de837c15a5
commit
1705b439b1
@ -818,8 +818,7 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int *
|
|||||||
while ((dev = dev_iter_get(cmd, iter))) {
|
while ((dev = dev_iter_get(cmd, iter))) {
|
||||||
if (!_dev_in_hint_hash(cmd, dev))
|
if (!_dev_in_hint_hash(cmd, dev))
|
||||||
continue;
|
continue;
|
||||||
memset(devpath, 0, sizeof(devpath));
|
(void) dm_strncpy(devpath, dev_name(dev), sizeof(devpath));
|
||||||
strncpy(devpath, dev_name(dev), PATH_MAX);
|
|
||||||
calc_hash = calc_crc(calc_hash, (const uint8_t *)devpath, strlen(devpath));
|
calc_hash = calc_crc(calc_hash, (const uint8_t *)devpath, strlen(devpath));
|
||||||
calc_count++;
|
calc_count++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user