Patchwork [07/26] lib: fwts_framework: remove fw parameter from fwts_framework_test_find

login
register
mail settings
Submitter Colin King
Date Oct. 14, 2012, 8:31 p.m.
Message ID <1350246738-31699-8-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/191403/
State Accepted
Headers show

Comments

Colin King - Oct. 14, 2012, 8:31 p.m.
From: Colin Ian King <colin.king@canonical.com>

We don't need the fw parameter in fwts_framework_test_find so remove
it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_framework.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Alex Hung - Oct. 15, 2012, 3:20 a.m.
On 10/15/2012 04:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We don't need the fw parameter in fwts_framework_test_find so remove
> it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_framework.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 8637882..075a652 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -636,7 +636,7 @@ static void fwts_framework_tests_run(fwts_framework *fw, fwts_list *tests_to_run
>    *  fwts_framework_test_find()
>    *	find a named test, return test if found, NULL otherwise
>    */
> -static fwts_framework_test *fwts_framework_test_find(fwts_framework *fw, const char *name)
> +static fwts_framework_test *fwts_framework_test_find(const char *name)
>   {
>   	fwts_list_link *item;
>
> @@ -826,7 +826,7 @@ static int fwts_framework_skip_test_parse(fwts_framework *fw, const char *arg, f
>   	fwts_framework_test *test;
>
>   	for (str = (char*)arg; (token = strtok_r(str, ",", &saveptr)) != NULL; str = NULL) {
> -		if ((test = fwts_framework_test_find(fw, token)) == NULL) {
> +		if ((test = fwts_framework_test_find(token)) == NULL) {
>   			fprintf(stderr, "No such test '%s'\n", token);
>   			return FWTS_ERROR;
>   		} else
> @@ -1171,7 +1171,7 @@ int fwts_framework_args(const int argc, char **argv)
>   		if (*argv[i] == '-')
>   			continue;
>
> -		if ((test = fwts_framework_test_find(fw, argv[i])) == NULL) {
> +		if ((test = fwts_framework_test_find(argv[i])) == NULL) {
>   			fprintf(stderr, "No such test '%s', available tests:\n",argv[i]);
>   			fwts_framework_show_tests_brief();
>   			ret = FWTS_ERROR;
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Oct. 17, 2012, 7:40 a.m.
On Mon, Oct 15, 2012 at 4:31 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We don't need the fw parameter in fwts_framework_test_find so remove
> it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_framework.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 8637882..075a652 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -636,7 +636,7 @@ static void fwts_framework_tests_run(fwts_framework *fw, fwts_list *tests_to_run
>   *  fwts_framework_test_find()
>   *     find a named test, return test if found, NULL otherwise
>   */
> -static fwts_framework_test *fwts_framework_test_find(fwts_framework *fw, const char *name)
> +static fwts_framework_test *fwts_framework_test_find(const char *name)
>  {
>         fwts_list_link *item;
>
> @@ -826,7 +826,7 @@ static int fwts_framework_skip_test_parse(fwts_framework *fw, const char *arg, f
>         fwts_framework_test *test;
>
>         for (str = (char*)arg; (token = strtok_r(str, ",", &saveptr)) != NULL; str = NULL) {
> -               if ((test = fwts_framework_test_find(fw, token)) == NULL) {
> +               if ((test = fwts_framework_test_find(token)) == NULL) {
>                         fprintf(stderr, "No such test '%s'\n", token);
>                         return FWTS_ERROR;
>                 } else
> @@ -1171,7 +1171,7 @@ int fwts_framework_args(const int argc, char **argv)
>                 if (*argv[i] == '-')
>                         continue;
>
> -               if ((test = fwts_framework_test_find(fw, argv[i])) == NULL) {
> +               if ((test = fwts_framework_test_find(argv[i])) == NULL) {
>                         fprintf(stderr, "No such test '%s', available tests:\n",argv[i]);
>                         fwts_framework_show_tests_brief();
>                         ret = FWTS_ERROR;
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index 8637882..075a652 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -636,7 +636,7 @@  static void fwts_framework_tests_run(fwts_framework *fw, fwts_list *tests_to_run
  *  fwts_framework_test_find()
  *	find a named test, return test if found, NULL otherwise
  */
-static fwts_framework_test *fwts_framework_test_find(fwts_framework *fw, const char *name)
+static fwts_framework_test *fwts_framework_test_find(const char *name)
 {
 	fwts_list_link *item;
 
@@ -826,7 +826,7 @@  static int fwts_framework_skip_test_parse(fwts_framework *fw, const char *arg, f
 	fwts_framework_test *test;
 
 	for (str = (char*)arg; (token = strtok_r(str, ",", &saveptr)) != NULL; str = NULL) {
-		if ((test = fwts_framework_test_find(fw, token)) == NULL) {
+		if ((test = fwts_framework_test_find(token)) == NULL) {
 			fprintf(stderr, "No such test '%s'\n", token);
 			return FWTS_ERROR;
 		} else
@@ -1171,7 +1171,7 @@  int fwts_framework_args(const int argc, char **argv)
 		if (*argv[i] == '-')
 			continue;
 
-		if ((test = fwts_framework_test_find(fw, argv[i])) == NULL) {
+		if ((test = fwts_framework_test_find(argv[i])) == NULL) {
 			fprintf(stderr, "No such test '%s', available tests:\n",argv[i]);
 			fwts_framework_show_tests_brief();
 			ret = FWTS_ERROR;