Fix two issues detected by coverty. 1.) copy /paste error. 2.) dead code

This commit is contained in:
Dave Davenport 2016-11-30 08:41:47 +01:00
parent e7a7b78cce
commit 2220b75467
2 changed files with 3 additions and 2 deletions

View File

@ -184,7 +184,8 @@ static gchar *fuzzy_to_regex ( const char * input )
if ( *iter == '\\' ){
g_string_append_c ( str, '\\');
iter = g_utf8_next_char ( iter );
if ( iter == NULL ) break;
// If EOL, break out of for loop.
if ( (*iter) == '\0' ) break;
}
g_string_append_unichar ( str, g_utf8_get_char ( iter ) );
g_string_append ( str, ")" );

View File

@ -1595,7 +1595,7 @@ void rofi_view_cleanup ()
}
if ( CacheState.repaint_source > 0 ) {
g_source_remove ( CacheState.repaint_source );
CacheState.idle_timeout = 0;
CacheState.repaint_source = 0;
}
if ( CacheState.fake_bg ) {
cairo_surface_destroy ( CacheState.fake_bg );