Re: [PATCH] net: make getname() functions return length rather than use int* parameter

2018-02-12 Thread Denys Vlasenko
On 02/12/2018 06:47 PM, David Miller wrote: From: Denys Vlasenko Date: Mon, 12 Feb 2018 15:15:18 +0100 Before: All these functions either return a negative error indicator, or store length of sockaddr into "int *socklen" parameter and return zero on success. "int

Re: [PATCH] net: make getname() functions return length rather than use int* parameter

2018-02-12 Thread David Miller
From: Denys Vlasenko Date: Mon, 12 Feb 2018 15:15:18 +0100 > Before: > All these functions either return a negative error indicator, > or store length of sockaddr into "int *socklen" parameter > and return zero on success. > > "int *socklen" parameter is awkward. For

[PATCH] net: make getname() functions return length rather than use int* parameter

2018-02-12 Thread Denys Vlasenko
Before: All these functions either return a negative error indicator, or store length of sockaddr into "int *socklen" parameter and return zero on success. "int *socklen" parameter is awkward. For example, if caller does not care, it still needs to provide on-stack storage for the value it does