[ovs-dev] [InBandOVSDB 3/4] socket-util: Factor out new function inet_parse_active().

Justin Pettit jpettit at nicira.com
Mon Apr 26 07:22:47 UTC 2010

On Apr 26, 2010, at 12:02 AM, Justin Pettit wrote:

> On Apr 20, 2010, at 4:37 PM, Ben Pfaff wrote:
>> +/* Parses 'target', which should be a string in the format "<host>[:<port>]".
>> + * <host> is required.  If 'default_port' is nonzero then <port> is optional
>> + * and defaults to 'default_port'.
>> *
>> + * On success, returns true and stores the parsed remote address into '*sinp'.
>> + * On failure, logs an error and returns false. */
>> +bool
>> +inet_parse_active(const char *target_, uint16_t default_port,
>> +                  struct sockaddr_in *sinp)
> I believe the description should refer to "target_" instead of "target".  There are a few existing functions that have this same issue in the file.

I forgot to mention that I think it would be useful to mention that "*sinp" is modified regardless of whether there was success or not.


More information about the dev mailing list