aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagnostic/diagnostic.c
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2019-10-21 17:18:03 +0300
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2019-10-21 17:18:03 +0300
commit654b47df33d6e1e6c73376393c2d4e9ad2a86baf (patch)
tree98917a0e109e837a8ff10c250a0e760e7d0b8c0c /src/diagnostic/diagnostic.c
parentf5118fe6a885220dbf245dc73d91019f2c276d72 (diff)
downloadlibrin-654b47df33d6e1e6c73376393c2d4e9ad2a86baf.tar.gz
librin-654b47df33d6e1e6c73376393c2d4e9ad2a86baf.tar.bz2
librin-654b47df33d6e1e6c73376393c2d4e9ad2a86baf.zip
diagnostic: allow reseting output stream.
We previously treated trying to set channel's stream to NULL as an invalid request, while a completely valid use-case for this is to allow resetting the stream to whichever default it uses. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/diagnostic/diagnostic.c')
-rw-r--r--src/diagnostic/diagnostic.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/diagnostic/diagnostic.c b/src/diagnostic/diagnostic.c
index c0ee294..4d67573 100644
--- a/src/diagnostic/diagnostic.c
+++ b/src/diagnostic/diagnostic.c
@@ -48,10 +48,6 @@ int rin_diag_flags(int flag, int action)
int rin_diag_set_outstream(enum rin_diag_outstream channel, FILE *stream)
{
- if (!stream) {
- return EINVAL;
- }
-
switch (channel) {
case rin_diag_err:
state.err = stream;