Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" Newsgroups: comp.lang.c Subject: Re: So You Think You Can Const? Date: Wed, 15 Jan 2025 13:51:43 -0800 Organization: A noiseless patient Spider Lines: 49 Message-ID: References: <20250107130809.661@kylheku.com> <87a5c15ob0.fsf@bsb.me.uk> <87ldvk4wu7.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 15 Jan 2025 22:51:43 +0100 (CET) Injection-Info: dont-email.me; posting-host="a9440ed6a09fbf00a98ca7c926ae9291"; logging-data="3296924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pyehKaf79OO9Hz0/DXi1XH+I31zUmyPo=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Wyx8dVNp2tjlbvJqpDrOyH15hpc= In-Reply-To: Content-Language: en-US Bytes: 2610 On 1/15/2025 5:17 AM, Julio Di Egidio wrote: > On 09/01/2025 02:09, Ben Bacarisse wrote: >> Julio Di Egidio writes: >> >>> static AvlTree_t const *AvlTree_node( >>>      void const *pk, AvlTree_t const *pL, AvlTree_t const *pR >>> ) { >>>      AvlTree_t *pT; >>> >>>      pT = malloc(sizeof(AvlTree_t)); >>> >>>      if (!pT) { >>>          return NULL; >>>      } >>> >>>      pT->pk = pk; >>>      pT->pL = pL; >>>      pT->pR = pR; >>> >>>      return pT; >>> } >> >> Just on a side issue, I prefer to make tests like this positive so I'd >> write: > > Just on a side issue, I prefer you go eat shit and die. > >>   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. >> > > No, you won't, your pal David Satan Brown is gonna do it for you... I don't think David is the actual devil? ;^o God damn! You got really pissed off!