cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: New SSL backend GSKit, certinfo for everyone, etc.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 14 Jul 2013 21:07:01 +0200 (CEST)

On Fri, 12 Jul 2013, Patrick Monnerat wrote:

> Your comments are welcome. If nobody objects, I'll commit it in a few days.

Thanks for your work, it looks really promising! (I've always had a bad
conscience due to that OpenSSL-specific code for certinfo.)

Apart from Dan's request about separating the work into more than one chunk, I
have some additional but minor comments:

Did you use 'configure --enable-debug' ? That using int to receive return
values for strlen() is bound to cause compile warnings as it is normally
declared to return a size_t which is unsigned...

A less important request from me, is to separate assignments from conditional
checks. In your code you do it several times in this style:

  if(!(var = functioncall()) {
    handle_error;
  }

... while we generally try to write curl code to separate them like:

  var = functioncall();
  if(!var) {
    handle_error;
  }

... slightly more verbose but easier to read and single-steps nicer with
debuggers IMO.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-14