Reply to post: Apple's cut'n'paste blunder

You've seen things people wouldn't believe – so tell us your programming horrors

Voland's right hand Silver badge

Apple's cut'n'paste blunder

Gotos are a way of life in C.

The error there is not the goto, not the double goto, but the lack of brackets around the if-ed operand. That is what is asking for a clusterf*** and what I have seen clusterf*** so often it is not even funny.

I usually prohibit it as "unacceptable coding style" internally and bounce any code which uses it at review. Bracket it, so it is clear what you are doing. End of story.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon