Deutsch   English   Français   Italiano  
<vaohtn$2o2h$1@gal.iecc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: Code guidelines
Date: Wed, 4 Sep 2024 08:45:19 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vb8vlv$3nlvo$1@dont-email.me>
References: <vb6v1t$3b5mb$1@dont-email.me> <vb726n$3b4rq$1@dont-email.me>
 <vb736j$3b5mb$2@dont-email.me> <vb75g9$3bntp$1@dont-email.me>
 <vb77tn$3bu07$3@dont-email.me> <vb7d6l$3d5mv$1@dont-email.me>
 <vb7dve$3d5mv$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 04 Sep 2024 08:45:20 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="0366692407b62e2f3ab0bc1ba1697c81";
	logging-data="3921912"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18wJPUuUXvmG+eOK16vwGs2xztvsMDKnUs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:ubGTu6SP0wPUPKqmQY6h4ekYSqA=
In-Reply-To: <vb7dve$3d5mv$2@dont-email.me>
Content-Language: en-GB
Bytes: 1908

On 03/09/2024 18:37, Thiago Adams wrote:

> 
> I also have a interesting sample with linked list
> 

Speaking generally rather than specifically about this code, your extra 
checks are redundant when the code is run from a single thread, and 
insufficient if it is later used from multiple threads (accessing the 
same data).  But extra checks can fool people into thinking it is safe - 
since the checks are unnecessary for sequential code they must have been 
put there to catch rare race conditions.


There are times when you want seat-belts /and/ airbags.  But focusing on 
that instead of making sure the driver is competent is not helpful!