libdvbv5: don't write polarization and user parms twice
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 4 Sep 2014 21:41:00 +0000 (18:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 4 Sep 2014 21:41:00 +0000 (18:41 -0300)
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 <m.chehab@samsung.com>
lib/libdvbv5/dvb-file.c

index cfaad31..bc71bd9 100644 (file)
@@ -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;