diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-11-30 08:41:47 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-11-30 08:41:47 +0100 |
commit | 2220b754670cc19a419e5b0942687a1f45ecdf66 (patch) | |
tree | 0ee14893d65cd5bdda91bc13337eff469d712ed0 | |
parent | e7a7b78cce5b2fb4828eabd651b2ede0ee43a699 (diff) |
Fix two issues detected by coverty. 1.) copy /paste error. 2.) dead code
-rw-r--r-- | source/helper.c | 3 | ||||
-rw-r--r-- | source/view.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/helper.c b/source/helper.c index 8c3d9cb7..0437519f 100644 --- a/source/helper.c +++ b/source/helper.c @@ -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, ")" ); diff --git a/source/view.c b/source/view.c index fca571b3..ab88e13f 100644 --- a/source/view.c +++ b/source/view.c @@ -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 ); |