Skip to content

Commit

Permalink
Clean up inconsistent comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Jul 11, 2023
1 parent 795551a commit 4a9e750
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion config_kde.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bool proxy_config_kde_global_init(void) {
break;
}

// Check to see if config file exists
// Check if config file exists
if (access(config_path, F_OK) == -1)
return false;

Expand Down
2 changes: 1 addition & 1 deletion config_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ char *proxy_config_mac_get_auto_config_url(void) {
if (!proxy_settings)
return NULL;

// Check to see if auto-config url is enabled
// Check if auto-config url is enabled
if (get_cf_dictionary_bool(proxy_settings, kCFNetworkProxiesProxyAutoConfigEnable)) {
// Get the auto-config url
CFStringRef auto_config_url = CFDictionaryGetValue(proxy_settings, kCFNetworkProxiesProxyAutoConfigURLString);
Expand Down
4 changes: 2 additions & 2 deletions resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ static bool proxy_resolver_get_proxies_for_url_from_system_config(void *ctx, con
goto config_done;
}

// Check to see if manually configured proxy is specified in system config
// Check if manually configured proxy is specified in system config
proxy = proxy_config_get_proxy(scheme);
if (proxy) {
// Check to see if we need to bypass the proxy for the url
// Check if we need to bypass the proxy for the url
char *bypass_list = proxy_config_get_bypass_list();
bool should_bypass = should_bypass_proxy(url, bypass_list);
if (should_bypass) {
Expand Down
4 changes: 2 additions & 2 deletions resolver_gnome3.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ proxy_resolver_i_s *proxy_resolver_gnome3_get_interface(void) {
proxy_resolver_gnome3_cancel,
proxy_resolver_gnome3_create,
proxy_resolver_gnome3_delete,
false /* get_proxies_for_url should be spooled to another thread */,
true /* get_proxies_for_url takes into account system config */,
false, // get_proxies_for_url should be spooled to another thread
true, // get_proxies_for_url takes into account system config
proxy_resolver_gnome3_global_init,
proxy_resolver_gnome3_global_cleanup};
return &proxy_resolver_gnome3_i;
Expand Down
4 changes: 2 additions & 2 deletions resolver_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ proxy_resolver_i_s *proxy_resolver_mac_get_interface(void) {
proxy_resolver_mac_cancel,
proxy_resolver_mac_create,
proxy_resolver_mac_delete,
false /* get_proxies_for_url should be spooled to another thread */,
false /* get_proxies_for_url does not take into account system config */,
false, // get_proxies_for_url should be spooled to another thread
false, // get_proxies_for_url does not take into account system config
proxy_resolver_mac_global_init,
proxy_resolver_mac_global_cleanup};
return &proxy_resolver_mac_i;
Expand Down
4 changes: 2 additions & 2 deletions resolver_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ proxy_resolver_i_s *proxy_resolver_posix_get_interface(void) {
proxy_resolver_posix_cancel,
proxy_resolver_posix_create,
proxy_resolver_posix_delete,
false /* get_proxies_for_url should be spooled to another thread */,
false /* get_proxies_for_url does not take into account system config */,
false, // get_proxies_for_url should be spooled to another thread
false, // get_proxies_for_url does not take into account system config
proxy_resolver_posix_global_init,
proxy_resolver_posix_global_cleanup};
return &proxy_resolver_posix_i;
Expand Down
4 changes: 2 additions & 2 deletions resolver_win8.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ proxy_resolver_i_s *proxy_resolver_win8_get_interface(void) {
proxy_resolver_win8_cancel,
proxy_resolver_win8_create,
proxy_resolver_win8_delete,
true /* get_proxies_for_url is handled asynchronously */,
false /* get_proxies_for_url does not take into account system config */,
true, // get_proxies_for_url is handled asynchronously
false, // get_proxies_for_url does not take into account system config
proxy_resolver_win8_global_init,
proxy_resolver_win8_global_cleanup};
return &proxy_resolver_win8_i;
Expand Down
4 changes: 2 additions & 2 deletions resolver_winrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ proxy_resolver_i_s *proxy_resolver_winrt_get_interface(void) {
proxy_resolver_winrt_cancel,
proxy_resolver_winrt_create,
proxy_resolver_winrt_delete,
true /* get_proxies_for_url is handled asynchronously */,
true /* get_proxies_for_url takes into account system config */,
true, // get_proxies_for_url is handled asynchronously
true, // get_proxies_for_url takes into account system config
proxy_resolver_winrt_global_init,
proxy_resolver_winrt_global_cleanup};
return &proxy_resolver_winrt_i;
Expand Down
6 changes: 3 additions & 3 deletions resolver_winxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bool proxy_resolver_winxp_get_proxies_for_url(void *ctx, const char *url) {
if (proxy_info.lpszProxyBypass)
bypass_list = wchar_dup_to_utf8(proxy_info.lpszProxyBypass);
if (bypass_list) {
// Check to see if we need to bypass the proxy for the url
// Check if we need to bypass the proxy for the url
bool should_bypass = should_bypass_proxy(url, bypass_list);
if (should_bypass) {
// Bypass the proxy for the url
Expand Down Expand Up @@ -234,8 +234,8 @@ proxy_resolver_i_s *proxy_resolver_winxp_get_interface(void) {
proxy_resolver_winxp_cancel,
proxy_resolver_winxp_create,
proxy_resolver_winxp_delete,
false /* get_proxies_for_url should be spooled to another thread */,
false /* get_proxies_for_url does not take into account system config */,
false, // get_proxies_for_url should be spooled to another thread
false, // get_proxies_for_url does not take into account system config
proxy_resolver_winxp_global_init,
proxy_resolver_winxp_global_cleanup};
return &proxy_resolver_winxp_i;
Expand Down
2 changes: 1 addition & 1 deletion util_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ char *get_config_value(const char *config, const char *section, const char *key)
}
}

// Check to see if we are in the right section
// Check if we are in the right section
if (line_len > 2 && line_start[0] == '[' && line_end[-1] == ']')
in_section = strncmp(line_start + 1, section, line_len - 2) == 0;

Expand Down
2 changes: 1 addition & 1 deletion util_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ char *get_winhttp_proxy_by_scheme(const char *scheme, const char *proxy_list) {
host_start++;
}

// Check to see if the scheme in the proxy config matches the url scheme
// Check if the scheme in the proxy config matches the url scheme
if (real_scheme_len == config_scheme_len && _strnicmp(real_scheme, config_scheme, config_scheme_len) == 0) {
if (!config_end)
config_end = host_start + strlen(host_start);
Expand Down

0 comments on commit 4a9e750

Please sign in to comment.