Deutsch   English   Français   Italiano  
<20240624012527.8bbe16b96f5bfca10feadb5c@gmail.moc>

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

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Anton Shepelev <anton.txt@gmail.moc>
Newsgroups: comp.lang.c
Subject: Re: Fixing a sample from K&R book using cake static analyser
Date: Mon, 24 Jun 2024 01:25:27 +0300
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <20240624012527.8bbe16b96f5bfca10feadb5c@gmail.moc>
References: <v53sl1$35qt7$1@dont-email.me>
	<v558hv$3dskb$1@dont-email.me>
	<20240623034624.135@kylheku.com>
	<87wmmfq4if.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 24 Jun 2024 00:25:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c092b4272f57de9975d74d7342d26349";
	logging-data="582965"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18IZap1Xo8+fHaQHRRaUSkdI+9C5mZp3xE="
Cancel-Lock: sha1:+zw8CymxW/VtFPaQH/G61be/6Sk=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Bytes: 1758

Ben Bacarisse:

> I don't get why the goto crowd want to complicate it so
> much.

Will someone post a goto-less that fixes what I perceive as
bugs in the original:

  a.  the failure to free() a newly allocated nlist in case
      of a later error,

  b.  the failure to free() a newly allocated np->name in
      case of a later error,

  c.  the failure to keep np->defn unchaged if the
      allocation of the new defn value failed.

And my perception be wrong, let us first establish the
actual bug(s).

-- 
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments