[vlc-commits] fourcc: improve duplicate error message
Rémi Denis-Courmont
git at videolan.org
Fri Jun 12 20:38:55 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 12 21:38:38 2015 +0300| [0fbeeb3e8075843540e3dce6ce20beed57b1d0cd] | committer: Rémi Denis-Courmont
fourcc: improve duplicate error message
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fbeeb3e8075843540e3dce6ce20beed57b1d0cd
---
src/misc/fourcc_gen.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/misc/fourcc_gen.c b/src/misc/fourcc_gen.c
index aedd7d8..7d99d44 100644
--- a/src/misc/fourcc_gen.c
+++ b/src/misc/fourcc_gen.c
@@ -92,16 +92,14 @@ static void process_list(const char *name, const staticentry_t *list, size_t n)
size_t dups = 0;
for (size_t i = 1; i < n; i++)
- {
- if (!memcmp(entries[i].fourcc, entries[i].alias, 4))
- continue;
- if (!memcmp(entries[i - 1].alias, entries[i].alias, 4))
+ if (!memcmp(entries[i - 1].alias, entries[i].alias, 4)
+ && memcmp(entries[i - 1].fourcc, entries[i].fourcc, 4))
{
- fprintf(stderr, "Error: FourCC \"%.4s\" (alias of \"%.4s\") "
- "duplicated!\n", entries[i].alias, entries[i].fourcc);
+ fprintf(stderr, "Error: FourCC alias \"%.4s\" conflict: "
+ "\"%.4s\" and \"%.4s\"\n", entries[i].alias,
+ entries[i - 1].fourcc, entries[i].fourcc);
dups++;
}
- }
if (dups > 0)
exit(1);
More information about the vlc-commits
mailing list