hartmannathan commented on pull request #904: URL: https://github.com/apache/incubator-nuttx-apps/pull/904#issuecomment-981720272
Looks like I'm late to the party but LGTM. Just one question: Are we sure we want to remove the typecast from the (void *) returned by malloc() to (FAR struct dhcpc_state_s *) in this call: ``` -pdhcpc = (FAR struct dhcpc_state_s *)malloc(sizeof(struct dhcpc_state_s)); +pdhcpc = malloc(sizeof(struct dhcpc_state_s) + maclen - 1); ``` Some compilers may warn about that. Might also benefit from a comment explaining the `maclen - 1` such as: ``` /* maclen - 1: First byte of maclen is included in the structure */ ``` So that someone in the future won't think it's a mistake. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
