This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix return value of uo_redirect


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=82bbe65a43015a753bec8c64869679a699331a5b

commit 82bbe65a43015a753bec8c64869679a699331a5b
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Sat Nov 26 22:05:25 2016 -0500

    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.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/ui-out.c  | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 21d10c4..d6d5dc6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
 
+	* ui-out.c (uo_redirect): Return the return value from the
+	implementation function.
+
+2016-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
+
 	* ui-out.c (ui_out_destroy, uo_data_destroy): Remove.
 	* ui-out.h (ui_out_destroy): Remove.
 
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 407c349..7f36545 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 */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]