]> Cypherpunks.ru repositories - goredo.git/blobdiff - ood.go
Unify copyright comment format
[goredo.git] / ood.go
diff --git a/ood.go b/ood.go
index ac5730cee6dbabf91b6d0b4c1325be70504bf456..120a7de8afd554d95cb8397c01182a4db6eac99e 100644 (file)
--- a/ood.go
+++ b/ood.go
@@ -1,25 +1,24 @@
-/*
-goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2023 Sergey Matveev <stargrave@stargrave.org>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 3 of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
+// goredo -- djb's redo implementation on pure Go
+// Copyright (C) 2020-2024 Sergey Matveev <stargrave@stargrave.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 3 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 // Out-of-date determination
 
 package main
 
 import (
+       "bytes"
        "errors"
        "fmt"
        "io"
@@ -161,7 +160,7 @@ func isOOD(tgt *Tgt, level int, seen map[string]*Tgt) (bool, error) {
                        return ood, TgtError{tgt, ErrLine(err)}
                }
 
-               if inode[:8] != ifchange.Inode()[:8] {
+               if !bytes.Equal(inode[:8], ifchange.Inode()[:8]) {
                        tracef(CDebug, "ood: %s%s -> %s: size differs", indent, tgt, ifchange.tgt)
                        ood = true
                        OODCache[ifchange.tgt.rel] = ood