From: Mauro Carvalho Chehab Date: Thu, 4 Sep 2014 21:41:00 +0000 (-0300) Subject: libdvbv5: don't write polarization and user parms twice X-Git-Tag: v4l-utils-1.4.0~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec8684a85552286aa21bb6ef7f94a837ff411ce3;p=platform%2Fupstream%2Fv4l-utils.git libdvbv5: don't write polarization and user parms twice Currently, there are two loops printing user cmds. This is not needed, and will just write duplicate values at the output. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c index cfaad31..bc71bd9 100644 --- a/lib/libdvbv5/dvb-file.c +++ b/lib/libdvbv5/dvb-file.c @@ -781,31 +781,6 @@ int dvb_write_file(const char *fname, struct dvb_file *dvb_file) *attr_name); } fprintf(fp, "\n"); - - for (i = 0; i < entry->n_props; i++) { - if (entry->props[i].cmd < DTV_USER_COMMAND_START) - continue; - const char * const *attr_name = dvb_user_attr_names[entry->props[i].cmd - DTV_USER_COMMAND_START]; - if (attr_name) { - int j; - - for (j = 0; j < entry->props[i].u.data; j++) { - if (!*attr_name) - break; - attr_name++; - } - } - - if (!attr_name || !*attr_name) - fprintf(fp, "\t%s = %u\n", - dvb_user_name[entry->props[i].cmd - DTV_USER_COMMAND_START], - entry->props[i].u.data); - else - fprintf(fp, "\t%s = %s\n", - dvb_user_name[entry->props[i].cmd - DTV_USER_COMMAND_START], - *attr_name); - } - fprintf(fp, "\n"); } fclose(fp); return 0;