Zdenek,

This is really messy.   Can't you make all of that a subroutine instead of 
adding so many lines of code?  
Ideally the new subroutine (e.g. AtoI) should have the same format as atoi(), 
but will detect errors and have printf's if there are errors.  If errors, it 
returns int of 0. 
 
Then to make code conform to it, just 's/atoi/AtoI/g'.

Andy

-----Original Message-----
From: Zdenek Styblik [mailto:zdenek.styb...@gmail.com] 
Sent: Wednesday, October 31, 2012 4:51 PM
To: ipmitool-devel
Subject: [Ipmitool-devel] Code Review - ID: 3528271 - 'lib/ipmi_fru.c' 
-possible *flow via FRUID

Hi,

attached is my take on elimination of atoi() from 'lib/ipmi_fru.c' and shot at 
input validation.
Code review anyone, please?

Thanks,
Z.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to