staging: most: core: remove trailing zero from text property
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Wed, 21 Sep 2016 12:49:08 +0000 (14:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2016 09:54:46 +0000 (11:54 +0200)
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>
drivers/staging/most/mostcore/core.c

index 5f05a13157f742f4d56047c4b7ce911cabac8028..29e8a1c5d3f90a98d6326ab27118ebcfd8a5b5d7 100644 (file)
@@ -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