summaryrefslogtreecommitdiff
path: root/gocryptfs-xray
diff options
context:
space:
mode:
Diffstat (limited to 'gocryptfs-xray')
-rw-r--r--gocryptfs-xray/paths_ctlsock.go2
-rw-r--r--gocryptfs-xray/xray_tests/xray_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/gocryptfs-xray/paths_ctlsock.go b/gocryptfs-xray/paths_ctlsock.go
index c489f0e..278916f 100644
--- a/gocryptfs-xray/paths_ctlsock.go
+++ b/gocryptfs-xray/paths_ctlsock.go
@@ -31,7 +31,7 @@ func transformPaths(socketPath string, req *ctlsock.RequestStruct, in *string, s
separator = '\000'
}
r := bufio.NewReader(os.Stdin)
- for eof := false; eof == false; line++ {
+ for eof := false; !eof; line++ {
val, err := r.ReadBytes(separator)
if len(val) == 0 {
break
diff --git a/gocryptfs-xray/xray_tests/xray_test.go b/gocryptfs-xray/xray_tests/xray_test.go
index 790d2db..2df83f2 100644
--- a/gocryptfs-xray/xray_tests/xray_test.go
+++ b/gocryptfs-xray/xray_tests/xray_test.go
@@ -20,7 +20,7 @@ func TestAesgcmXray(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if bytes.Compare(out, expected) != 0 {
+ if !bytes.Equal(out, expected) {
t.Errorf("Unexpected output")
fmt.Printf("expected:\n%s", string(expected))
fmt.Printf("have:\n%s", string(out))
@@ -37,7 +37,7 @@ func TestAessivXray(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if bytes.Compare(out, expected) != 0 {
+ if !bytes.Equal(out, expected) {
t.Errorf("Unexpected output")
fmt.Printf("expected:\n%s", string(expected))
fmt.Printf("have:\n%s", string(out))