diff mbox

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

Message ID 1343987338-10612-11-git-send-email-Anand.Jain@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anand Jain Aug. 3, 2012, 9:48 a.m. UTC
From: Anand Jain <anand.jain@oracle.com>


Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 btrfs-list.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

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;