[Asterisk-code-review] cdr.c: Eliminated simple RAII VAR usages. (asterisk[13])
Corey Farrell
asteriskteam at digium.com
Tue Oct 10 12:58:02 CDT 2017
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/6722 )
Change subject: cdr.c: Eliminated simple RAII_VAR usages.
......................................................................
Patch Set 1:
> > > > These are definitely not whitespace changes. Some of the exit
> > > paths now do not call ao2_cleanup() when the cleanup object is
> > > always going to be NULL.
> > >
> > > Right, but it's still just moving code around for the sake of
> it.
> > > These changes have no bearing on functionality. I'm not
> > necessarily
> > > against it (heck lots of the code could use some refactoring).
> > >
> > > I'm more wondering for changes like these if we need a coding
> > > guidelines rule similar to the whitespace one.
> > >
> > > Anyone else feel free to chime in with opinions.
> >
> > The current policy is that we allow new features if they have
> > testing, so don't see why we wouldn't allow non-breaking
> > improvements to code which already has testing. RAII_VAR is more
> > expensive than directly calling ao2_cleanup so this is a minor
> > optimization even in paths where the cleanup object will never be
> > NULL.
>
> I agree with all this too. Maybe for similar reasons and problems
> it could cause with merging we should just remove the stipulation
> from the coding guidelines that whitespace/formatting changes can
> only go into master.
+1. Only allowing whitespace/formatting to be fixed in master means that they just never get fixed, nobody wants to create merge issues for that. Especially if/else conditional blocks and nested loops that lack brackets can be very confusing.
--
To view, visit https://gerrit.asterisk.org/6722
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I150505db307249a962987e7b941bdd369bb91f35
Gerrit-Change-Number: 6722
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 10 Oct 2017 17:58:02 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171010/39b65771/attachment.html>
More information about the asterisk-code-review
mailing list