From 132db51b1f205ff2a85c9e44d44daab296b90e30 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Mon, 26 Mar 2007 11:24:42 -0400 Subject: generations on headers --- hasher.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hasher.c') diff --git a/hasher.c b/hasher.c index 96702da4..435dbfa5 100644 --- a/hasher.c +++ b/hasher.c @@ -15,6 +15,8 @@ int main() { break; if (strlen(line) == 0) continue; + if (line[strlen(line)-1] == '\n') + line[strlen(line)-1] = '\0'; ret = btrfs_name_hash(line, strlen(line), &result); BUG_ON(ret); printf("hash returns %Lu\n", result); -- cgit v1.2.3