diff mbox

[v2,1/6] libdvbv5: Remove buggy parsing of extra DTV_foo parameters

Message ID a386f3a8a7b76795dc487f9ae6ec728628c5bc0a.1371561676.git.gmsoft@tuxicoman.be (mailing list archive)
State New, archived
Headers show

Commit Message

Guy Martin June 18, 2013, 2:19 p.m. UTC
The parsing of those extra parameters is buggy and completely useless since they are parsed
individually later on in the code.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
---
 lib/libdvbv5/dvb-file.c | 25 -------------------------
 1 file changed, 25 deletions(-)

Comments

André Roth July 2, 2013, 6:28 p.m. UTC | #1
Acked-by: André Roth <neolynx@gmail.com>


On Tue, 18 Jun 2013 16:19:04 +0200
Guy Martin <gmsoft@tuxicoman.be> wrote:

> The parsing of those extra parameters is buggy and completely useless since they are parsed
> individually later on in the code.
> 
> Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
> ---
>  lib/libdvbv5/dvb-file.c | 25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c
> index d8d583c..aa42a37 100644
> --- a/lib/libdvbv5/dvb-file.c
> +++ b/lib/libdvbv5/dvb-file.c
> @@ -392,31 +392,6 @@ static int fill_entry(struct dvb_entry *entry, char *key, char *value)
>  		return 0;
>  	}
>  
> -	/* Handle the DVB extra DTV_foo properties */
> -	for (i = 0; i < ARRAY_SIZE(dvb_user_name); i++) {
> -		if (!dvb_user_name[i])
> -			continue;
> -		if (!strcasecmp(key, dvb_user_name[i]))
> -			break;
> -	}
> -	if (i < ARRAY_SIZE(dvb_user_name)) {
> -		const char * const *attr_name = dvb_attr_names(i);
> -		n_prop = entry->n_props;
> -		entry->props[n_prop].cmd = i + DTV_USER_COMMAND_START;
> -		if (!attr_name || !*attr_name)
> -			entry->props[n_prop].u.data = atol(value);
> -		else {
> -			for (j = 0; attr_name[j]; j++)
> -				if (!strcasecmp(value, attr_name[j]))
> -					break;
> -			if (!attr_name[j])
> -				return -2;
> -			entry->props[n_prop].u.data = j + DTV_USER_COMMAND_START;
> -		}
> -		entry->n_props++;
> -		return 0;
> -	}
> -
>  	/* Handle the other properties */
>  
>  	if (!strcasecmp(key, "SERVICE_ID")) {
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c
index d8d583c..aa42a37 100644
--- a/lib/libdvbv5/dvb-file.c
+++ b/lib/libdvbv5/dvb-file.c
@@ -392,31 +392,6 @@  static int fill_entry(struct dvb_entry *entry, char *key, char *value)
 		return 0;
 	}
 
-	/* Handle the DVB extra DTV_foo properties */
-	for (i = 0; i < ARRAY_SIZE(dvb_user_name); i++) {
-		if (!dvb_user_name[i])
-			continue;
-		if (!strcasecmp(key, dvb_user_name[i]))
-			break;
-	}
-	if (i < ARRAY_SIZE(dvb_user_name)) {
-		const char * const *attr_name = dvb_attr_names(i);
-		n_prop = entry->n_props;
-		entry->props[n_prop].cmd = i + DTV_USER_COMMAND_START;
-		if (!attr_name || !*attr_name)
-			entry->props[n_prop].u.data = atol(value);
-		else {
-			for (j = 0; attr_name[j]; j++)
-				if (!strcasecmp(value, attr_name[j]))
-					break;
-			if (!attr_name[j])
-				return -2;
-			entry->props[n_prop].u.data = j + DTV_USER_COMMAND_START;
-		}
-		entry->n_props++;
-		return 0;
-	}
-
 	/* Handle the other properties */
 
 	if (!strcasecmp(key, "SERVICE_ID")) {