Commit 5a6a6caf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Simplification assuming that sizeof(char) = 1

parent 4833d61b
...@@ -1797,8 +1797,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci, ...@@ -1797,8 +1797,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
NULL, 0, p_tmp ) ) ) NULL, 0, p_tmp ) ) )
{ {
strncat( p_tmp, p_filename, min( strlen( p_filename ), strncat( p_tmp, p_filename, min( strlen( p_filename ),
(sizeof(p_tmp)/sizeof(p_tmp[0]) - 1) - (sizeof(p_tmp) - 1) - strlen( p_tmp ) ) );
strlen( p_tmp ) ) );
psz_path = FromLocale( p_tmp ); psz_path = FromLocale( p_tmp );
strncpy( p_tmp, psz_path, sizeof( p_tmp ) - 1 ); strncpy( p_tmp, psz_path, sizeof( p_tmp ) - 1 );
...@@ -1818,7 +1817,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci, ...@@ -1818,7 +1817,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
#define ISCINFO "iSCInfo" #define ISCINFO "iSCInfo"
if( strstr( psz_ipod, ISCINFO ) == NULL ) if( strstr( psz_ipod, ISCINFO ) == NULL )
{ {
snprintf( p_tmp, sizeof(p_tmp)/sizeof(p_tmp[0]) - 1, snprintf( p_tmp, sizeof(p_tmp) - 1,
"%s/iPod_Control/iTunes/" ISCINFO "2", psz_ipod ); "%s/iPod_Control/iTunes/" ISCINFO "2", psz_ipod );
psz_path = p_tmp; psz_path = p_tmp;
} }
......
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