diff options
author | Max Kellermann <max@duempel.org> | 2008-11-27 17:56:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-27 17:56:32 +0100 |
commit | 45352152fbdcac20b39161069406ad6d5288bd98 (patch) | |
tree | 0fd7d529b7680de22ce33b8cc670c8994ef455ee /src/screen_utils.c | |
parent | f7d53b74a7743e120f9f1019c594cbd2de708caf (diff) | |
download | mpd-45352152fbdcac20b39161069406ad6d5288bd98.tar.gz mpd-45352152fbdcac20b39161069406ad6d5288bd98.tar.xz mpd-45352152fbdcac20b39161069406ad6d5288bd98.zip |
list_window: use "bool" instead of "int"
For flags and return values, use the "bool" data type instead of
"int".
Diffstat (limited to 'src/screen_utils.c')
-rw-r--r-- | src/screen_utils.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/screen_utils.c b/src/screen_utils.c index ff3fffa44..20b4be1a4 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -159,7 +159,7 @@ screen_find(list_window_t *lw, void *callback_data) { int reversed = 0; - int retval = 0; + bool found; const char *prompt = FIND_PROMPT; char *value = options.find_show_last_pattern ? (char *) -1 : NULL; @@ -189,21 +189,17 @@ screen_find(list_window_t *lw, if (screen.findbuf == NULL) return 1; - if (reversed) - retval = list_window_rfind(lw, - callback_fn, - callback_data, - screen.findbuf, - options.find_wrap, - rows); - else - retval = list_window_find(lw, - callback_fn, - callback_data, - screen.findbuf, - options.find_wrap); - - if (retval != 0) { + found = reversed + ? list_window_rfind(lw, + callback_fn, callback_data, + screen.findbuf, + options.find_wrap, + rows) + : list_window_find(lw, + callback_fn, callback_data, + screen.findbuf, + options.find_wrap); + if (!found) { screen_status_printf(_("Unable to find \'%s\'"), screen.findbuf); screen_bell(); |