code cleanup: Use 'CURLcode result'