mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-12 13:18:31 +03:00
o _tok_cpy was broken
This commit is contained in:
parent
195a1ffe13
commit
2ebc92681e
@ -274,7 +274,7 @@ static int _line_splitter(struct file *file, const char *buffer,
|
|||||||
while(b < e) {
|
while(b < e) {
|
||||||
b = _eat_space(b, e);
|
b = _eat_space(b, e);
|
||||||
if (b == e)
|
if (b == e)
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
lb = b;
|
lb = b;
|
||||||
while((b != e) && *b != '\n')
|
while((b != e) && *b != '\n')
|
||||||
@ -315,5 +315,5 @@ static void _tok_cpy(char *dest, size_t max,
|
|||||||
if (len > --max)
|
if (len > --max)
|
||||||
len = max;
|
len = max;
|
||||||
strncpy(dest, b, len);
|
strncpy(dest, b, len);
|
||||||
dest[len] = '0';
|
dest[len] = '\0';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user