Commit 7e62d37d authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

move the actual compare code to BOZO_check_carray

Signed-off-by: Jean-Paul Saman's avatarJean-Paul Saman <jpsaman@videolan.org>
parent d7ca3502
......@@ -174,9 +174,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
i_loop_count = 0;
BOZO_begin_array(<xsl:value-of select="@name" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />);
i_err = memcmp(s_decoded.<xsl:value-of select="@name" />,
p_new_decoded-><xsl:value-of select="@name" />,
sizeof(s_decoded.<xsl:value-of select="@name" />));
BOZO_check_carray(<xsl:value-of select="@name" />)
BOZO_end_array
</xsl:template>
......
......@@ -1919,9 +1919,7 @@ static int main_short_event_0(void)
i_loop_count = 0;
BOZO_begin_array(i_iso_639_code)
BOZO_DOJOB(ShortEvent);
i_err = memcmp(s_decoded.i_iso_639_code,
p_new_decoded->i_iso_639_code,
sizeof(s_decoded.i_iso_639_code));
BOZO_check_carray(i_iso_639_code)
BOZO_end_array
/* check i_event_name */
......@@ -1959,9 +1957,7 @@ static int main_short_event_1(void)
i_loop_count = 0;
BOZO_begin_array(i_iso_639_code)
BOZO_DOJOB(ShortEvent);
i_err = memcmp(s_decoded.i_iso_639_code,
p_new_decoded->i_iso_639_code,
sizeof(s_decoded.i_iso_639_code));
BOZO_check_carray(i_iso_639_code)
BOZO_end_array
/* check i_text */
......@@ -1998,9 +1994,7 @@ static int main_short_event_2(void)
i_loop_count = 0;
BOZO_begin_array(i_iso_639_code)
BOZO_DOJOB(ShortEvent);
i_err = memcmp(s_decoded.i_iso_639_code,
p_new_decoded->i_iso_639_code,
sizeof(s_decoded.i_iso_639_code));
BOZO_check_carray(i_iso_639_code)
BOZO_end_array
/* check i_text */
......
......@@ -166,6 +166,10 @@ static void BOZO_fill_array(void *a, size_t len)
i_err = 1; \
}
#define BOZO_check_carray(name) \
i_err = memcmp(s_decoded.name, p_new_decoded->name, \
sizeof(s_decoded.name));
#define BOZO_check_array_gen(name, len_name) \
else if( !i_err \
&& (memcmp(s_decoded.name, p_new_decoded->name, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment