Re: [PATCH nft v2 0/4] [RESENT] remove xfree() and add free_const()+nft_gmp_free()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-11-09 at 17:05 +0100, Pablo Neira Ayuso wrote:
> On Tue, Oct 24, 2023 at 11:57:06AM +0200, Thomas Haller wrote:
> > RESENT of v1.
> > 
> > Also rebased on top of current `master`, which required minor
> > adjustments.
> > 
> > Also minor adjustments to the commit messages.
> 
> Applied.

Thanks.

> 
> To be honest, reading the longish commit descriptions several times,
> I
> doubt there is any benefit in this, 

I claim, there was no benefit in xfree(). that's why it was dropped in
favor of standard free(). The special function xfree() needs a
justification, not the other way around.


> I might end up myself using
> free_const() everywhere not to figure out if it is const or not,
> because I don't really care.

That seems not a good practice. Const-correctness may help you to catch
bugs via unwanted modifications. If constness is unnecessarily cast
away, it's looses such hints from the compiler.


Thomas





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux