<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.6462" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Nice find Mark.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>It might be an interesting exercise for students to
re-write the code so that it is goto-less. A simple compound conditional
won't do the trick (at least not without introducing more variables). I
would also be getting rid of the fancy-pants variable assignment that happens
inside the conditional expression of each if. As far as I can tell, the function
should return 0 if all is well, otherwise it should return the value in
err.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Robert T-A</FONT></DIV>
<DIV> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=mark@vceit.com href="mailto:mark@vceit.com">Mark</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=sofdev@edulists.com.au
href="mailto:sofdev@edulists.com.au">Year 12 Software Development Teachers'
Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, February 25, 2014 11:34
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Year 12 SofDev] Apple
programming goof</DIV>
<DIV><BR></DIV>
<DIV dir=ltr>
<DIV><SPAN
style="FONT-SIZE: 13px; COLOR: rgb(51,51,51); LINE-HEIGHT: 20px; FONT-FAMILY: Arial,Verdana,sans-serif">this
might make your kids feel a bit better about bugs in their
code...</SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 13px; COLOR: rgb(51,51,51); LINE-HEIGHT: 20px; FONT-FAMILY: Arial,Verdana,sans-serif"><BR></SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 13px; COLOR: rgb(51,51,51); LINE-HEIGHT: 20px; FONT-FAMILY: Arial,Verdana,sans-serif">'Like
everything else on the iPhone, the critical crypto flaw announced in iOS 7
yesterday turns out to be a study in simplicity and elegant design: a single
spurious “goto” in one part of Apple’s authentication code that accidentally
bypasses the rest of it.'</SPAN><BR></DIV>
<DIV><BR></DIV><A
href="http://www.wired.com/threatlevel/2014/02/gotofail/">http://www.wired.com/threatlevel/2014/02/gotofail/</A>
<DIV><BR></DIV>
<DIV><BR clear=all>
<DIV><BR></DIV>-- <BR>
<DIV dir=ltr>--
<DIV>Mark Kelly</DIV>
<DIV>mark AT vceit DOT com</DIV>
<DIV><A href="http://vceit.com" target=_blank>http://vceit.com</A></DIV>
<DIV><BR></DIV>
<DIV>
<DIV><I>Everything that used to be a sin is now a disease - Bill
Maher </I></DIV></DIV>
<DIV><BR></DIV></DIV></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List kindly
supported by<BR>http://www.vcaa.vic.edu.au - Victorian Curriculum and
Assessment Authority
and<BR>http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
<BR>http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc<BR>http://www.swinburne.edu.au/ict/schools -
Swinburne University</BLOCKQUOTE></BODY></HTML>