Thread (18 messages) 18 messages, 3 authors, 2012-08-14
STALE5088d

[PATCH 9/9] Btrfs-progs: fix the btrfs subvol list path last char

From: Anand jain <hidden>
Date: 2012-08-03 09:51:44
Subsystem: the rest · Maintainer: Linus Torvalds

From: Anand Jain <redacted>


Signed-off-by: Anand Jain <redacted>
---
 btrfs-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index e0cb782..6e83b31 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -205,7 +205,7 @@ static int add_root(struct root_lookup *root_lookup,
 	if (name)
 		strncpy(ri->name, name, name_len);
 	if (name_len > 0)
-		ri->name[name_len-1] = 0;
+		ri->name[name_len] = '\0';
 	if (gen)
 		ri->gen = *gen;
 	ri->otime = ot;
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help