From: Ævar Arnfjörð Bjarmason Date: Sat, 07 Aug 2010 08:34:53 GMT Subject: Re: [PATCH v2] Allow HTTP user agent string to be modified. Message-ID: In-Reply-To: <1281152060-16736-1-git-send-email-olsonse@umich.edu> On Sat, Aug 7, 2010 at 03:34, Spencer E. Olson wrote: > -       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);