Skip to content

Commit

Permalink
misc: small fix or general refactoring i did not bother commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Mar 30, 2021
1 parent 6dd86c4 commit 0d17ba3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 62 deletions.
6 changes: 3 additions & 3 deletions network/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ var iwlistFreqParser = regexp.MustCompile(`^\s+Channel.([0-9]+)\s+:\s+([0-9\.]+)
func iwlistSupportedFrequencies(iface string) ([]int, error) {
out, err := core.Exec("iwlist", []string{iface, "freq"})
if err != nil {
return err
return nil, err
}

freqs := make([]int, 0)
if output != "" {
scanner := bufio.NewScanner(strings.NewReader(output))
if out != "" {
scanner := bufio.NewScanner(strings.NewReader(out))
for scanner.Scan() {
line := scanner.Text()
matches := iwlistFreqParser.FindStringSubmatch(line)
Expand Down
59 changes: 0 additions & 59 deletions network/net_linux_test.go

This file was deleted.

0 comments on commit 0d17ba3

Please sign in to comment.