Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12093 )

Change subject: Log: add stdout target
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12093/1/src/logging.c
File src/logging.c:

https://gerrit.osmocom.org/#/c/12093/1/src/logging.c@926
PS1, Line 926:          if (target->tgt_file.out != stdout)
> Could you elaborate? How else should it look like? And why you think it's 
> wrong?
This looks messy:
if (target->tgt_file.out != stderr)
if (target->tgt_file.out != stdout)
{
        fclose(target->tgt_file.out);
        target->tgt_file.out = NULL;
}

I'd welcome perhaps something like:
#if stderr
if (target->tgt_file.out == stderr) {/* don't close */} else
#endif
#if stdout
if (target->tgt_file.out == stdout) {/* don't close */} else
#endif
{
        fclose(target->tgt_file.out);
        target->tgt_file.out = NULL;
}



--
To view, visit https://gerrit.osmocom.org/12093
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia786361f5f687e43b27d87a45b4630bca58bcfe8
Gerrit-Change-Number: 12093
Gerrit-PatchSet: 1
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-CC: Pau Espin Pedrol <[email protected]>
Gerrit-Comment-Date: Tue, 04 Dec 2018 12:18:02 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to