Frédéric Delanoy : winedump: Use BOOL type where appropriate.
Module: wine Branch: master Commit: 201e49d4aa66cbc907841d8c6b94f9a40daf7984 URL: http://source.winehq.org/git/wine.git/?a=commit;h=201e49d4aa66cbc907841d8c6b... Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Jan 3 01:57:01 2014 +0100 winedump: Use BOOL type where appropriate. --- tools/winedump/main.c | 2 +- tools/winedump/search.c | 8 ++++---- tools/winedump/winedump.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/winedump/main.c b/tools/winedump/main.c index 9b076e1..ca2047b 100644 --- a/tools/winedump/main.c +++ b/tools/winedump/main.c @@ -447,7 +447,7 @@ int main (int argc, char *argv[]) int result = symbol_demangle (&symbol); if (result) - result = symbol_search (&symbol); + result = !symbol_search (&symbol); if (!result && symbol.function_name) /* Clean up the prototype */ diff --git a/tools/winedump/search.c b/tools/winedump/search.c index 7b3a98f..08aa8e1 100644 --- a/tools/winedump/search.c +++ b/tools/winedump/search.c @@ -36,7 +36,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg); * Call Patrik Stridvall's 'function_grep.pl' script to retrieve a * function prototype from include file(s) */ -int symbol_search (parsed_symbol *sym) +BOOL symbol_search (parsed_symbol *sym) { static const size_t MAX_RESULT_LEN = 1024; FILE *grep; @@ -47,7 +47,7 @@ int symbol_search (parsed_symbol *sym) assert (sym && sym->symbol); if (!symbol_is_valid_c (sym)) - return - 1; + return FALSE; if (!grep_buff) grep_buff = malloc (MAX_RESULT_LEN); @@ -137,7 +137,7 @@ int symbol_search (parsed_symbol *sym) { pclose (f_grep); pclose (grep); - return 0; /* OK */ + return TRUE; /* OK */ } if (VERBOSE) puts ("Failed, trying next"); @@ -152,7 +152,7 @@ int symbol_search (parsed_symbol *sym) attempt++; } - return -1; /* Not found */ + return FALSE; /* Not found */ } diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index ea7fc87..754a7d2 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -166,7 +166,7 @@ void symbol_init(parsed_symbol* symbol, const char* name); int symbol_demangle (parsed_symbol *symbol); -int symbol_search (parsed_symbol *symbol); +BOOL symbol_search (parsed_symbol *symbol); void symbol_clear(parsed_symbol *sym);
participants (1)
-
Alexandre Julliard