From: Zdenek S. <zde...@gm...> - 2011-11-10 15:48:43
|
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. |