[sr-dev] [kamailio/kamailio] core: const correctness (PR #3120)

Henning Westerholt hw at gilawa.com
Fri May 20 14:03:08 CEST 2022

I think they are useful. I have done several changes like this in the past. It allows the Compiler to optimize better and will also prevent unintended modifications which can lead to bugs
From: sr-dev <sr-dev-bounces at lists.kamailio.org> on behalf of liviu-rolo <notifications at github.com>
Sent: Friday, May 20, 2022 2:57:59 PM
To: Kamailio Devel List <sr-dev at lists.sip-router.org>
Cc: Subscribed <subscribed at noreply.github.com>
Subject: Re: [sr-dev] [kamailio/kamailio] core: const correctness (PR #3120)

They are not necessary.
In fact, I needed const only in init_dst_from_rcv for an internal module, but, with the occasion, I added more const for consistency - including existing code like su_cmp and su_getport.
So, apart from consistency and style, they are neither useful for the community, I guess.

Reply to this email directly, view it on GitHub<https://github.com/kamailio/kamailio/pull/3120#issuecomment-1132815693>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABO7UZL2DCGGMJHPOZ654JDVK544PANCNFSM5WPA2VNA>.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3120/c1132815693 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220520/5f63f545/attachment-0001.htm>

More information about the sr-dev mailing list