<p></p>
<p>In the case of the two functions you mention, then <code>_xavi_list_crt</code> is hidden in the c file (being declared static, since it is controlled in very special cases related transaction states, ...), so if those functions are used outside of the file, then they still need  wrappers to call a common function (for xavp and xavi) with the adequate list.</p>
<p>And my remark was targeting exactly this case, because the functions have like 10 effective lines of code. A wrapper function is like 3 lines of code, with a jump on the stack. So overall it is not a significant gain.</p>
<p>It makes sense to have a function for a small number of lines of code, if the function is used in a lot of places, but if it going to be used in 2-3 places, then it has to be a significant number of codes of lines to really worth it.</p>
<p>Of course, it can be seen as a personal preference, but I prefer code easier to follow/search/maintain instead of modularising every snippet of code.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2337#issuecomment-636094675">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLCEIJH624IP7SXZZDRT7WUPANCNFSM4NKNSDYQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZL2XNNUPQYNW4V2JPLRT7WUPA5CNFSM4NKNSDY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEXVARUY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2337#issuecomment-636094675",
"url": "https://github.com/kamailio/kamailio/pull/2337#issuecomment-636094675",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>