All of lore.kernel.org
 help / color / mirror / Atom feed
From: kohaerenzstifter@posteo.de (Martin Knappe)
To: kernelnewbies@lists.kernelnewbies.org
Subject: goto???
Date: Fri, 17 Jul 2015 23:58:00 +0200	[thread overview]
Message-ID: <fc219fdfc24de271dc455e35e56cc677@posteo.de> (raw)
In-Reply-To: <24785.1437167213@turing-police.cc.vt.edu>

My first solution was the answer to the question how to write that 
function without the use of goto.
I did that in less than 10 minutes and it's absolutely flawless, so yes 
it's VERY EASY.

I posted the second solution only to show how I personally would prefer 
to write that function, in a way that actually DOES use gotos, too.
My third solution was just a minor correction to this second solution 
(just one statement added), and had nothing to do with the first 
solution and the original question, of how to avoid gotos at all.

Try to

Read, Concentrate and Think ...

If you don't understand what we're talking about, please be quiet.

Yes it's VERY EASY to rewrite that function without using gotos (see my 
first post). It is and remains correct.


Am 17.07.2015 23:06 schrieb Valdis.Kletnieks at vt.edu:
> On Fri, 17 Jul 2015 10:48:53 +0200, Martin Knappe said:
>> Very easy:
> 
> On Fri, 17 Jul 2015 11:40:00 +0200, Martin Knappe said:
>> Like so:
> 
> On Fri, 17 Jul 2015 11:44:34 +0200, Martin Knappe said:
>> Sorry, have to correct my solution. You need to add "cleanupState = 0"
>> just before the "finish", like so:
> 
> I think the fact we've seen 3 version inside an hour shows that it's
> not as "Very easy" as originally asserted.

  reply	other threads:[~2015-07-17 21:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  7:55 goto??? Navy
2015-07-17  8:11 ` goto??? Sudip Mukherjee
2015-07-17  8:48   ` goto??? Martin Knappe
2015-07-17  9:13     ` goto??? Sudip Mukherjee
2015-07-17  9:22       ` goto??? Martin Knappe
2015-07-17  9:31         ` goto??? Sudip Mukherjee
2015-07-17  9:40           ` goto??? Martin Knappe
2015-07-17  9:44           ` goto??? Martin Knappe
2015-07-17 21:06             ` goto??? Valdis.Kletnieks at vt.edu
2015-07-17 21:58               ` Martin Knappe [this message]
2015-07-17  9:07 ` goto??? Anuz Pratap Singh Tomar
2015-07-17 10:00 ` goto??? Bernd Petrovitsch
2015-07-17 10:21   ` goto??? Luis de Bethencourt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc219fdfc24de271dc455e35e56cc677@posteo.de \
    --to=kohaerenzstifter@posteo.de \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.