Am 17.09.2012 17:23, schrieb Bharata B Rao:
> sockets: Change inet_parse() to accept address specification without port
> 
> From: Bharata B Rao <bhar...@linux.vnet.ibm.com>
> 
> inet_parse() expects address:port. Change it to work without explicit port
> specification. In addition, don't depend solely on the return value of

Things like "in addition" in a commit message are almost always a sign
that the patch should be split in two.

> sscanf but also consider the value obtained for %n directive used in sscanf.
> This ensures that the scanning of malformed inet address isn't flagged as
> success.

Can you give an example string that would be falsely accepted? To me the
old checks look fine (even though the new ones are a little bit easier
to read, so even if they don't fix anything, they might be worth doing).

Anyway, it does look correct.

Kevin

Reply via email to