Thread (9 messages) 9 messages, 3 authors, 2016-06-15

Re: [PATCH v2] Allow HTTP user agent string to be modified.

flat view

From: Spencer E. Olson <hidden>
Date: 2016-06-15 22:49:16

I would have no problem doing that.  I was just trying to match the
style already present in http.c.  All the other pointer tests in that
function/file are done the same.


On Sat, 2010-08-07 at 08:34 +0000, Ævar Arnfjörð Bjarmason wrote:
On Sat, Aug 7, 2010 at 03:34, Spencer E. Olson [off-list ref] wrote:
quoted
-       curl_easy_setopt(result, CURLOPT_USERAGENT, GIT_USER_AGENT);
+       if (user_agent != NULL)
+               curl_easy_setopt(result, CURLOPT_USERAGENT, user_agent);
+       else
+               curl_easy_setopt(result, CURLOPT_USERAGENT, GIT_USER_AGENT);
Can't you just skip the != NULL?:

       if (user_agent)
               curl_easy_setopt(result, CURLOPT_USERAGENT, user_agent);
       else
               curl_easy_setopt(result, CURLOPT_USERAGENT, GIT_USER_AGENT);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help