[PATCH 04/22] Fix return value of uo_redirect

Simon Marchi
2016-11-24T15:36:57Z

The wrapper uo_redirect seems like it should return the return value
from of implementation function, since callers rely on it, but it
doesn't.

gdb/ChangeLog:

* ui-out.c (uo_redirect): Return the return value from the
implementation function.
---
gdb/ui-out.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 9ac22dd..a7fdcd0 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -705,8 +705,7 @@ uo_redirect (struct ui_out *uiout, struct ui_file *outstream)
{
if (!uiout->impl->redirect)
return -1;
- uiout->impl->redirect (uiout, outstream);
- return 0;
+ return uiout->impl->redirect (uiout, outstream);
}

/* local functions */
--
2.10.0