[PATCH 04/35] fbdev: geode: Use safer strscpy() instead of strcpy()

Ai Chao <[email protected]>
Newsgroups org.kernel.vger.linux-parisc,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-fbdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use a safer function strscpy() instead of strcpy() for copying to arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Ai Chao <[email protected]>
---
 drivers/video/fbdev/geode/gx1fb_core.c | 2 +-
 drivers/video/fbdev/geode/gxfb_core.c  | 2 +-
 drivers/video/fbdev/geode/lxfb_core.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index a1919c1934ac..c5a6e3038b98 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -274,7 +274,7 @@ static struct fb_info *gx1fb_init_fbinfo(struct device *dev)
 
 	par = info->par;
 
-	strcpy(info->fix.id, "GX1");
+	strscpy(info->fix.id, "GX1");
 
 	info->fix.type		= FB_TYPE_PACKED_PIXELS;
 	info->fix.type_aux	= 0;
diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c
index 8d69be7c9d31..fe987829315b 100644
--- a/drivers/video/fbdev/geode/gxfb_core.c
+++ b/drivers/video/fbdev/geode/gxfb_core.c
@@ -289,7 +289,7 @@ static struct fb_info *gxfb_init_fbinfo(struct device *dev)
 
 	par = info->par;
 
-	strcpy(info->fix.id, "Geode GX");
+	strscpy(info->fix.id, "Geode GX");
 
 	info->fix.type		= FB_TYPE_PACKED_PIXELS;
 	info->fix.type_aux	= 0;
diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c
index cad99f5b7fe8..3ae37ec9f151 100644
--- a/drivers/video/fbdev/geode/lxfb_core.c
+++ b/drivers/video/fbdev/geode/lxfb_core.c
@@ -412,7 +412,7 @@ static struct fb_info *lxfb_init_fbinfo(struct device *dev)
 
 	par = info->par;
 
-	strcpy(info->fix.id, "Geode LX");
+	strscpy(info->fix.id, "Geode LX");
 
 	info->fix.type		= FB_TYPE_PACKED_PIXELS;
 	info->fix.type_aux	= 0;
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.