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.
This commit is contained in:
Simon Marchi 2016-11-26 22:05:25 -05:00
parent e4975d6a9c
commit 82bbe65a43
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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 */