aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-05-09 11:59:51 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2008-05-12 03:57:11 -0400
commit00377d8e3842776d1da633ad9c79a16ecb548b92 (patch)
tree647be450fa7c93a5dc1ad7fa650cde9db812b833 /fs
parentad99f77778e83358c371dab7a50bde69270ed6b8 (diff)
[GFS2] Prefer strlcpy() over snprintf()
strlcpy is faster than snprintf when you don't use the returned value. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_fstype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index ef9c6c4f80f6..b2028c82e8d1 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -142,8 +142,8 @@ static int init_names(struct gfs2_sbd *sdp, int silent)
142 if (!table[0]) 142 if (!table[0])
143 table = sdp->sd_vfs->s_id; 143 table = sdp->sd_vfs->s_id;
144 144
145 snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto); 145 strlcpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN);
146 snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table); 146 strlcpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN);
147 147
148 table = sdp->sd_table_name; 148 table = sdp->sd_table_name;
149 while ((table = strchr(table, '/'))) 149 while ((table = strchr(table, '/')))