]> Sergey Matveev's repositories - glocate.git/blobdiff - names.go
Unify copyright comment format
[glocate.git] / names.go
index c5a5809f5ed96f4fa99a1fcee861fd1cf301788fee60dc824a84c6d53744ce23..29e8be6bc8fea689f8504e04e844089309039e2c32feab33898a93553108f9b7 100644 (file)
--- a/names.go
+++ b/names.go
@@ -1,19 +1,17 @@
-/*
-glocate -- ZFS-diff-friendly locate-like utility
-Copyright (C) 2022-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/>.
-*/
+// glocate -- ZFS-diff-friendly locate-like utility
+// Copyright (C) 2022-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/>.
 
 package main
 
@@ -95,12 +93,12 @@ func deoctalize(s string) string {
        chars := make([]byte, 0, len(s))
        for i := 0; i < len(s); i++ {
                if s[i] == '\\' {
-                       b, err := strconv.ParseUint("0"+s[i+1:i+1+3], 0, 8)
+                       b, err := strconv.ParseUint(s[i+1:i+1+4], 0, 8)
                        if err != nil {
                                log.Fatalln(err)
                        }
                        chars = append(chars, byte(b))
-                       i += 3
+                       i += 4
                } else {
                        chars = append(chars, s[i])
                }