From 82bbe65a43015a753bec8c64869679a699331a5b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 26 Nov 2016 22:05:25 -0500 Subject: [PATCH] Fix return value of uo_redirect 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/ChangeLog | 5 +++++ gdb/ui-out.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 21d10c4be3..d6d5dc6554 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-11-26 Simon Marchi + + * ui-out.c (uo_redirect): Return the return value from the + implementation function. + 2016-11-26 Simon Marchi * ui-out.c (ui_out_destroy, uo_data_destroy): Remove. diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 407c349ebe..7f365457d2 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -703,8 +703,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 */