aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-06-13 01:39:18 -0400
committerMark Fasheh <mfasheh@suse.com>2008-07-14 16:57:15 -0400
commitfe9f387740ac7cb3b7c2fffa76807e997e6c6292 (patch)
tree40c052c3ace5e07980c01aa5c4ea5d2d0df9638b /fs/ocfs2/ocfs2_fs.h
parente407e39783a7206d20b3e9961aedf272de966e31 (diff)
ocfs2: Don't snprintf() without a format.
Some system files are per-slot. Their names include the slot number. ocfs2_sprintf_system_inode_name() uses the system inode definitions to fill in the slot number with snprintf(). For global system files, there is no node number, and the name was printed as a format with no arguments. -Wformat-nonliteral and -Wformat-security don't like this. Instead, use a static "%s" format and the name as the argument. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 52c426665154..3f1945177629 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -901,7 +901,7 @@ static inline int ocfs2_sprintf_system_inode_name(char *buf, int len,
901 * list has a copy per slot. 901 * list has a copy per slot.
902 */ 902 */
903 if (type <= OCFS2_LAST_GLOBAL_SYSTEM_INODE) 903 if (type <= OCFS2_LAST_GLOBAL_SYSTEM_INODE)
904 chars = snprintf(buf, len, 904 chars = snprintf(buf, len, "%s",
905 ocfs2_system_inodes[type].si_name); 905 ocfs2_system_inodes[type].si_name);
906 else 906 else
907 chars = snprintf(buf, len, 907 chars = snprintf(buf, len,