Re: [openssl-project] Style guide updates

2018-01-27 Thread Benjamin Kaduk
On Fri, Jan 26, 2018 at 01:26:58PM +, Salz, Rich wrote: > Some things I think we should add to the style guide. Let’s discuss here. > > No space after sizeof, use parens. (But see ssl/record/rec_layer_{d1,s3}.c ) > > Multiline conditionals, such as in an if, should be broken before the logi

Re: [openssl-project] Style guide updates

2018-01-27 Thread Andy Polyakov
>> - Use size_t for sizes of things > > How do you feel about ssize_t? One has to keep in mind that ssize_t is not part of C language specification, but POSIX thing. C specification defines ptrdiff_t with [presumably] desired properties. However, there is natural ambiguity originating from fact t

Re: [openssl-project] Style guide updates

2018-01-27 Thread Salz, Rich
And also https://github.com/openssl/web/pull/42 On 1/26/18, 1:11 PM, "Andy Polyakov" wrote: > What else needs to be updated? Relax requirement that argument names in function definition has to match function declaration to permit adding 'unused_' prefix prior unused

Re: [openssl-project] Style guide updates

2018-01-27 Thread Kurt Roeckx
On Sat, Jan 27, 2018 at 01:03:04PM +0100, Kurt Roeckx wrote: > > It's just that there seem to be 2 camps, one saying that all types > should be signed except when it's to access the bits. The other > that a size can't be negative so you go for an unsigned type. If > it's a signed type you could ch

Re: [openssl-project] Style guide updates

2018-01-27 Thread Kurt Roeckx
On Sat, Jan 27, 2018 at 12:26:38AM +, Matt Caswell wrote: > > > On 26/01/18 20:27, Kurt Roeckx wrote: > > On Fri, Jan 26, 2018 at 02:06:27PM +, Matt Caswell wrote: > >> - Use size_t for sizes of things > > > > How do you feel about ssize_t? > > When I did the size_t work in libssl one o