OoO Vers la fin de l'après-midi du jeudi 26 janvier 2012, vers 16:18,
Robert Story <[email protected]> disait :
VB> do not check for '\0'. For example:
VB>
VB> for ( cp = buf; *cp != ':'; cp++ )
VB> ;
VB>
VB> This will crash if there is no more ':'. The loop could be changed to:
VB>
VB> for ( cp = buf; *cp && *cp != ':'; cp++ )
VB> ;
VB> if (!*cp) {
VB> fclose(fp);
VB> netsnmp_swrun_entry_free(entry);
VB> continue;
VB> }
VB>
VB> Would a simple patch for this be accepted or is the condition too
VB> improbable?
> Sure. Better safe than sorry..
Hi!
I have added a patch in the patch tracker with my first patch:
https://sourceforge.net/tracker/index.php?func=detail&aid=3479740&group_id=12694&atid=312694
--
Vincent Bernat ☯ http://vincent.bernat.im
Replace repetitive expressions by calls to a common function.
- The Elements of Programming Style (Kernighan & Plauger)
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders