summaryrefslogtreecommitdiff
path: root/hasher.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-26 11:24:42 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-26 11:24:42 -0400
commit132db51b1f205ff2a85c9e44d44daab296b90e30 (patch)
treed0e7eb3446c047df2f4fca66e9cb7ec001352fcc /hasher.c
parent9fb549a6c1ccc19b2cf7e403aeed51688ff9aa7c (diff)
generations on headers
Diffstat (limited to 'hasher.c')
-rw-r--r--hasher.c2
1 files changed, 2 insertions, 0 deletions
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);