Commit 34a840a6 authored by Filip Roséen's avatar Filip Roséen Committed by Rémi Denis-Courmont

keystore/kwallet: values2key: simplify if-condition

There is no need to check for the inverse of a condition that was just
being checked.
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent e4dd5889
......@@ -149,10 +149,13 @@ values2key( const char* const* ppsz_values, bool b_search )
vlc_memstream_printf( &ms, "*" );
/* Path section */
if ( ppsz_values[KEY_PATH] && ppsz_values[KEY_PATH][0] == '/')
vlc_memstream_printf( &ms, "%s", ppsz_values[KEY_PATH] );
else if ( ppsz_values[KEY_PATH] && ppsz_values[KEY_PATH][0] != '/' )
vlc_memstream_printf( &ms, "/%s", ppsz_values[KEY_PATH] );
if( ppsz_values[KEY_PATH] )
{
if( ppsz_values[KEY_PATH][0] != '/' )
vlc_memstream_putc( &ms, '/' );
vlc_memstream_puts( &ms, ppsz_values[KEY_PATH] );
}
else if ( b_search )
vlc_memstream_printf( &ms, "*" );
......
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