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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 7, 2010 at 03:34, Spencer E. Olson <olsonse@xxxxxxxxx> 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);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]