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@lists.kamailio.org on behalf of liviu-rolo notifications@github.com Sent: Friday, May 20, 2022 2:57:59 PM To: Kamailio Devel List sr-dev@lists.sip-router.org Cc: Subscribed subscribed@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 GitHubhttps://github.com/kamailio/kamailio/pull/3120#issuecomment-1132815693, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABO7UZL2DCGGMJHPOZ654JDVK544PANCNFSM5WPA2VNA. You are receiving this because you are subscribed to this thread.Message ID: kamailio/kamailio/pull/3120/c1132815693@github.com