summaryrefslogtreecommitdiffstats
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>2016-09-21 14:49:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-22 11:54:46 +0200
commit22ff195b5a42a6935f624bcb995b6d051ee68872 (patch)
tree841d206747080a731789f90cd790632eaad7b4be /drivers/staging/most
parenta6f9d846cc0980ef85ba9a2c863cef2f6202ac83 (diff)
downloadblackbird-op-linux-22ff195b5a42a6935f624bcb995b6d051ee68872.tar.gz
blackbird-op-linux-22ff195b5a42a6935f624bcb995b6d051ee68872.zip
staging: most: core: remove trailing zero from text property
This patch removes trailing zeros from the strings returned by the attributes available_datatypes and available_directions. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/mostcore/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 5f05a13157f7..29e8a1c5d3f9 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -265,7 +265,7 @@ static ssize_t show_available_directions(struct most_c_obj *c,
if (c->iface->channel_vector[i].direction & MOST_CH_TX)
strcat(buf, "dir_tx ");
strcat(buf, "\n");
- return strlen(buf) + 1;
+ return strlen(buf);
}
static ssize_t show_available_datatypes(struct most_c_obj *c,
@@ -284,7 +284,7 @@ static ssize_t show_available_datatypes(struct most_c_obj *c,
if (c->iface->channel_vector[i].data_type & MOST_CH_ISOC_AVP)
strcat(buf, "isoc_avp ");
strcat(buf, "\n");
- return strlen(buf) + 1;
+ return strlen(buf);
}
static
OpenPOWER on IntegriCloud