Change in libosmocore[master]: Log: add stdout target

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Dec 4 12:18:02 UTC 2018


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 <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Dec 2018 12:18:02 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181204/3658369a/attachment.htm>


More information about the gerrit-log mailing list