Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db170068 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

virtio_console: silence a static checker warning



My static checker complains that this sprintf() can overflow but really
it can't.  Just silence the warning by using snprintf().

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 45c554ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1492,7 +1492,7 @@ static int add_port(struct ports_device *portdev, u32 id)
		 * Finally, create the debugfs file that we can use to
		 * inspect a port's state at any time
		 */
		sprintf(debugfs_name, "vport%up%u",
		snprintf(debugfs_name, sizeof(debugfs_name), "vport%up%u",
			 port->portdev->vdev->index, id);
		port->debugfs_file = debugfs_create_file(debugfs_name, 0444,
							 pdrvdata.debugfs_dir,