Hi, I'm thinking what would be the best way to get rid of atoi() in 'lib/ipmi_main.c' which is used for parsing of 'd', 'p' and 'C' arguments.
It seems to me to be a good idea to implement function in 'lib/helper.c' called str2short(). The reason is 'lib/helper.c' has 'limits.h' already included and 'lib/ipmi_main.c' doesn't. I would implement it in general way as str2uchar(), so: int str2short(char * str, uint16_t * short_ptr); and error messages/states handled outside of this function. Does it sound reasonable? Thanks, Z. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel