Page MenuHomeFreeBSD

savecore: Complete libxo transition.
ClosedPublic

Authored by bses30074_gmail.com on Aug 9 2023, 12:56 PM.
Tags
None
Referenced Files
F82874155: D41392.id125811.diff
Fri, May 3, 10:53 AM
Unknown Object (File)
Sat, Apr 27, 6:00 PM
Unknown Object (File)
Fri, Apr 26, 1:24 AM
Unknown Object (File)
Wed, Apr 3, 9:28 PM
Unknown Object (File)
Wed, Apr 3, 6:22 PM
Unknown Object (File)
Jan 18 2024, 5:25 PM
Unknown Object (File)
Dec 23 2023, 1:25 AM
Unknown Object (File)
Dec 12 2023, 10:02 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sbin/savecore/savecore.c
1568
sbin/savecore/savecore.c
1551

strange, why not logmsg() here? are there other instances?

sbin/savecore/savecore.c
1551

I scan the code quickly. It seems if the 'checkfor' flag is true, it uses the printf function instead of logmsg function. The checkfor flag is set if -C is set. The man page of savecore says "display a brief message to indicate the status". So maybe the brief message means using the simple printf function to show the message.

Update with exit(EXIT_SUCCESS) to replace return (0)

sbin/savecore/savecore.c
1568

Ask about this code. Should I always using exit function instead of return in main function.

des added inline comments.
sbin/savecore/savecore.c
1568

It's a matter of taste. The result is the same but calling exit() makes it clearer what's going on. It's especially relevant in programs that have multiple exit points, as is the case here.

This revision is now accepted and ready to land.Aug 10 2023, 7:36 PM
This revision was automatically updated to reflect the committed changes.