Liste des Groupes | Revenir à cl c |
On 10/01/2025 03:14, Julio Di Egidio wrote:...
...Julio Di Egidio <julio@diegidio.name> writes:
>On 09/01/2025 02:09, Ben Bacarisse wrote:
>Julio Di Egidio <julio@diegidio.name> writes:
...static AvlTree_t const *AvlTree_node(>
void const *pk, AvlTree_t const *pL, AvlTree_t const *pR
) {
AvlTree_t *pT = malloc(*pT);
if (pT) {
pT->pk = pk;
pT->pL = pL;
pT->pR = pR;
}
return pT;
}
I'm not going to "make a case" for this (though I will if you
want!) -- I just think it helps to see lots of different styles.
That is *more* error prone,
... check the return value as soon as the function returns a possibly>
null pointer or an error value is certainly more widely applicable,
and quite less error prone, especially if it's
I meant: immediately check the return value and bail out if needed.
The other approach does not even simplify on the clean-up, by the way...
Les messages affichés proviennent d'usenet.