summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-03-10 08:56:55 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 14:22:47 -0700
commit14eec444302c97a692a9cdc556f7590355610f92 (patch)
tree932cf49c9c3f88873dcddbcb407f3b3293fbf685 /drivers
parentb0a0fb1e292e1472db7aea8ddce2fc5ceae5ab48 (diff)
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: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/cxt1e1/linux.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index b2a06cafa63e..58fe0fe5228a 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -214,15 +214,13 @@ status_t
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 */
-
if (pi->wq_port)
return 0; /* already initialized */
- np = name;
- memset(name, 0, 16);
- sprintf(np, "%s%d", pi->up->devname, pi->portnum); /* IE pmcc4-01) */
+ /* IE pmcc4-01 */
+ snprintf(name, sizeof(name), "%s%d", pi->up->devname, pi->portnum);
#ifdef RLD_RESTART_DEBUG
pr_info(">> %s: creating workqueue <%s> for Port %d.\n",