<html><head></head><body>How do you allocate a variable size object without error checks, and potentially inside a compound? You're just moving the problem to the caller.<br><br><div class="gmail_quote">Le 2 avril 2020 12:25:26 GMT+03:00, Francois Cartegnie <fcvlcdev@free.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Le 02/04/2020 à 08:17, Rémi Denis-Courmont a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi,<br><br>If you add a parameter, there's no way to make the init function not allocate memory and return void. I much prefer this specific Nettle style over the generic gcrypt style (at least in C).<br></blockquote><br>nothing prevents having a 2 step setup to query buffer size and validate<br>support, then feed init with proper buffer.<br><br></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>