mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-25 01:34:38 +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) {
|
||||
b = _eat_space(b, e);
|
||||
if (b == e)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
lb = b;
|
||||
while((b != e) && *b != '\n')
|
||||
@ -315,5 +315,5 @@ static void _tok_cpy(char *dest, size_t max,
|
||||
if (len > --max)
|
||||
len = max;
|
||||
strncpy(dest, b, len);
|
||||
dest[len] = '0';
|
||||
dest[len] = '\0';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user