From 75d6c8c9f603626807e357112cc829fe6704b498 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 22 Aug 2001 14:30:30 +0000 Subject: [PATCH] o _tok_cpy was broken --- driver/device-mapper/dm-fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/device-mapper/dm-fs.c b/driver/device-mapper/dm-fs.c index ca549d4d8..fb4525569 100644 --- a/driver/device-mapper/dm-fs.c +++ b/driver/device-mapper/dm-fs.c @@ -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'; }