Skip to content

Commit

Permalink
code review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fffw committed Aug 5, 2015
1 parent 11bc97b commit 999ca6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/github.com/getlantern/flashlight/flashlight.go
Expand Up @@ -212,7 +212,7 @@ func runClientProxy(cfg *config.Config) {
// off.
//
// See: https://github.com/getlantern/lantern/issues/2776
doPACOff("http://" + cfg.UIAddr + "/proxy_on.pac")
doPACOff(fmt.Sprintf("http://%s/proxy_on.pac", cfg.UIAddr))
exit(nil)
}

Expand All @@ -224,9 +224,6 @@ func runClientProxy(cfg *config.Config) {
}

// Start user interface.
if cfg.UIAddr == "" {
exit(fmt.Errorf("Please provide a valid local or remote UI address"))
}
tcpAddr, err := net.ResolveTCPAddr("tcp4", cfg.UIAddr)
if err != nil {
exit(fmt.Errorf("Unable to resolve UI address: %v", err))
Expand Down
2 changes: 1 addition & 1 deletion src/github.com/getlantern/pac-cmd/linux.c
Expand Up @@ -31,7 +31,7 @@ int togglePac(bool turnOn, const char* pacUrl)
// clear pac setting only if it's equal to pacUrl
char* old_mode = g_settings_get_string(setting, "mode");
char* old_pac_url = g_settings_get_string(setting, "autoconfig-url");
if (strcmp(old_mode, "auto") != 0 || old_pac_url == NULL || strcmp(old_pac_url, pacUrl) != 0 ) {
if (strcmp(old_mode, "auto") != 0 || strcmp(old_pac_url, pacUrl) != 0 ) {
fprintf(stderr, "current pac url setting is not %s, skipping\n", pacUrl);
goto cleanup;
}
Expand Down
2 changes: 1 addition & 1 deletion src/github.com/getlantern/pac-cmd/main.c
Expand Up @@ -5,7 +5,7 @@

void usage(const char* binName)
{
printf("Usage: %s [on <pac url> | off [old pac url]]", binName);
printf("Usage: %s [on <pac url> | off [old pac url]]\n", binName);
exit(INVALID_FORMAT);
}

Expand Down

0 comments on commit 999ca6b

Please sign in to comment.