From patchwork Tue May 14 09:23:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guy Martin X-Patchwork-Id: 2563771 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5E2F0DF24C for ; Tue, 14 May 2013 09:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756952Ab3ENJiG (ORCPT ); Tue, 14 May 2013 05:38:06 -0400 Received: from venus.vo.lu ([80.90.45.96]:54261 "EHLO venus.vo.lu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756931Ab3ENJiE (ORCPT ); Tue, 14 May 2013 05:38:04 -0400 Received: from ibiza.bxl.tuxicoman.be (vodsl-9486.vo.lu [85.93.204.14]) by venus.vo.lu with SMTP (version=TLS\Tls cipher=Aes128 bits=128); Tue, 14 May 2013 11:37:50 +0200 Received: from lan226.bxl.tuxicoman.be ([172.19.1.226] helo=me) by ibiza.bxl.tuxicoman.be with smtp (Exim 4.80.1) (envelope-from ) id 1UcBgA-0002wE-4v for linux-media@vger.kernel.org; Tue, 14 May 2013 11:37:54 +0200 Received: (nullmailer pid 17200 invoked by uid 0); Tue, 14 May 2013 09:23:55 -0000 From: Guy Martin To: linux-media@vger.kernel.org Subject: [PATCH 1/5] libdvbv5: Remove buggy parsing of extra DTV_foo properties Date: Tue, 14 May 2013 11:23:51 +0200 Message-Id: X-Mailer: git-send-email 1.8.1.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 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")) {