[Ocfs2-devel] [PATCH] ocfs2: fix snprintf format specifier in dlmdebug.c

alex chen alex.chen at huawei.com
Thu Jan 8 01:31:25 PST 2015


Use snprintf format specifier "%lu" instead of "%ld" for
argument of type 'unsigned long'.

Signed-off-by: Alex Chen <alex.chen at huawei.com>
Reviewed-by: Joseph Qi <joseph.qi at huawei.com>
---
 fs/ocfs2/dlm/dlmdebug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index 149eb55..8251360 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -406,7 +406,7 @@ static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)
 	}
 	spin_unlock(&dlm->spinlock);

-	out += snprintf(buf + out, len - out, "Total on list: %ld\n", total);
+	out += snprintf(buf + out, len - out, "Total on list: %lu\n", total);

 	return out;
 }
@@ -464,7 +464,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len)
 	spin_unlock(&dlm->master_lock);

 	out += snprintf(buf + out, len - out,
-			"Total: %ld, Longest: %ld\n", total, longest);
+			"Total: %lu, Longest: %lu\n", total, longest);
 	return out;
 }

-- 
1.8.4.3




More information about the Ocfs2-devel mailing list