]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/ops_fstype.c
[GFS2] Prefer strlcpy() over snprintf()
[linux-2.6-omap-h63xx.git] / fs / gfs2 / ops_fstype.c
index ef9c6c4f80f6cb420ba539e26a601240bbb49183..b2028c82e8d1ae53fc04672303ce4e14fa3d7276 100644 (file)
@@ -142,8 +142,8 @@ static int init_names(struct gfs2_sbd *sdp, int silent)
        if (!table[0])
                table = sdp->sd_vfs->s_id;
 
-       snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto);
-       snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table);
+       strlcpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN);
+       strlcpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN);
 
        table = sdp->sd_table_name;
        while ((table = strchr(table, '/')))