Commit 393b3425 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Formatting cleaning

parent cffe2dbb
...@@ -580,8 +580,12 @@ static char *CreateHtmlSubtitle( char *psz_subtitle ) ...@@ -580,8 +580,12 @@ static char *CreateHtmlSubtitle( char *psz_subtitle )
psz_tag[ 0 ] = '\0'; psz_tag[ 0 ] = '\0';
if( psz_html_start != NULL ) if( psz_html_start == NULL )
{ {
free( psz_tag );
return NULL;
}
char *psz_html = psz_html_start; char *psz_html = psz_html_start;
strcpy( psz_html, "<text>" ); strcpy( psz_html, "<text>" );
...@@ -644,7 +648,7 @@ static char *CreateHtmlSubtitle( char *psz_subtitle ) ...@@ -644,7 +648,7 @@ static char *CreateHtmlSubtitle( char *psz_subtitle )
{ {
int i_len = strlen( psz_attribs[ k ] ); int i_len = strlen( psz_attribs[ k ] );
if( !strncasecmp( psz_subtitle, psz_attribs[ k ], i_len )) if( !strncasecmp( psz_subtitle, psz_attribs[k], i_len ))
{ {
i_len += strcspn( psz_subtitle + i_len, "\"" ) + 1; i_len += strcspn( psz_subtitle + i_len, "\"" ) + 1;
...@@ -785,7 +789,6 @@ static char *CreateHtmlSubtitle( char *psz_subtitle ) ...@@ -785,7 +789,6 @@ static char *CreateHtmlSubtitle( char *psz_subtitle )
/* Shrink the memory requirements */ /* Shrink the memory requirements */
psz_html_start = realloc( psz_html_start, psz_html - psz_html_start + 1 ); psz_html_start = realloc( psz_html_start, psz_html - psz_html_start + 1 );
} }
}
free( psz_tag ); free( psz_tag );
return psz_html_start; return psz_html_start;
} }
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