openssl: Use 'CURLcode result'

...and some minor code style changes.