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

Commit 14eec444 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman
Browse files

staging: cxt1e1: remove redundant memset() call



The name array doens't need to set to 0. Because
sprintf/snprintf adds a terminating '\0'.

And also it doesn't need to assign name array
address to np pointer.

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0a0fb1e
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -214,15 +214,13 @@ status_t
c4_wq_port_init(mpi_t *pi)
c4_wq_port_init(mpi_t *pi)
{
{


	char        name[16], *np;  /* NOTE: name of the queue limited by system
	char        name[16];  /* NOTE: name of the queue limited by system
				     * to 10 characters */
				     * to 10 characters */

	if (pi->wq_port)
	if (pi->wq_port)
		return 0;                   /* already initialized */
		return 0;                   /* already initialized */


	np = name;
	/* IE pmcc4-01 */
	memset(name, 0, 16);
	snprintf(name, sizeof(name), "%s%d", pi->up->devname, pi->portnum);
	sprintf(np, "%s%d", pi->up->devname, pi->portnum); /* IE pmcc4-01) */


#ifdef RLD_RESTART_DEBUG
#ifdef RLD_RESTART_DEBUG
	pr_info(">> %s: creating workqueue <%s> for Port %d.\n",
	pr_info(">> %s: creating workqueue <%s> for Port %d.\n",