<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
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
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> sr-dev <sr-dev-bounces@lists.kamailio.org> on behalf of liviu-rolo <notifications@github.com><br>
<b>Sent:</b> Friday, May 20, 2022 2:57:59 PM<br>
<b>To:</b> Kamailio Devel List <sr-dev@lists.sip-router.org><br>
<b>Cc:</b> Subscribed <subscribed@noreply.github.com><br>
<b>Subject:</b> Re: [sr-dev] [kamailio/kamailio] core: const correctness (PR #3120)</font>
<div> </div>
</div>
<div>
<p></p>
<p dir="auto">They are not necessary.<br>
In fact, I needed const only in <code class="x_notranslate">init_dst_from_rcv</code> for an internal module, but, with the occasion, I added more const for consistency - including existing code like
<code class="x_notranslate">su_cmp</code> and <code class="x_notranslate">su_getport</code>.<br>
So, apart from consistency and style, they are neither useful for the community, I guess.</p>
<p style="font-size:small; color:#666">—<br>
Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3120#issuecomment-1132815693">
view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZL2DCGGMJHPOZ654JDVK544PANCNFSM5WPA2VNA">
unsubscribe</a>.<br>
You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZNIPK76T2EUEUGFSRTVK544PA5CNFSM5WPA2VNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIOCWKTI.gif" height="1" width="1" alt=""><span style="color:transparent; font-size:0; display:none; visibility:hidden; overflow:hidden; opacity:0; width:0; height:0; max-width:0; max-height:0">Message
 ID: <span><kamailio/kamailio/pull/3120/c1132815693</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
</div>
</body>
</html>