[Ocfs2-tools-devel] [PATCH] fix compiling error in mount.ocfs2.c

Coly Li coly.li at suse.de
Sun Apr 11 00:50:47 PDT 2010


This patch fixes a compiling error in mount.ocfs2.

Signed-off-by: Coly Li <coly.li at suse.de>
---
 mount.ocfs2/mount.ocfs2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mount.ocfs2/mount.ocfs2.c b/mount.ocfs2/mount.ocfs2.c
index f820a30..36e74ac 100644
--- a/mount.ocfs2/mount.ocfs2.c
+++ b/mount.ocfs2/mount.ocfs2.c
@@ -261,7 +261,7 @@ int main(int argc, char **argv)
 	char *extra = NULL;
 	int dev_ro = 0;
 	char *hbstr = NULL;
-	char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1] = "";
+	char stackstr[sizeof(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN] = "";
 	ocfs2_filesys *fs = NULL;
 	struct o2cb_cluster_desc cluster;
 	struct o2cb_region_desc desc;
-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list