]> git.ipfire.org Git - thirdparty/systemd.git/commit
basic/log: make log_{info,warning,...} return void
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Sep 2020 11:18:25 +0000 (13:18 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Sep 2020 15:40:46 +0000 (17:40 +0200)
commit44f0dd628ce4ca9565b0e02b8cb63ed8272529cd
treed3fb2ad04856a64b11cecde062b069ecd27349b5
parentc413bb28df0996be99fd6b3f2335dfe8739d62fb
basic/log: make log_{info,warning,...} return void

log_debug still returns 0. I think it is legitimate to use 'return log_debug()' to
return 0. It is different than the other functions, since we often want to supress
errors logged at debug level. This case is quite common in the codebase and
we could use 'return log_debug_errno()' to make the code more consise.

For all other variants, a separate return line is required.
Previous commit changes all the non-conforming instances, now we can make it mandatory.
src/basic/log.h