]> Cypherpunks.ru repositories - nncp.git/commitdiff
Remove excess %s in log messages
authorSergey Matveev <stargrave@stargrave.org>
Thu, 11 Mar 2021 09:05:28 +0000 (12:05 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 11 Mar 2021 09:05:28 +0000 (12:05 +0300)
src/lockdir.go
src/tmp.go

index 2219d1bcfcd61643ada18a0df56557690d446990..902ec22124b624c73c145b20463f0616cf3d1595 100644 (file)
@@ -36,14 +36,14 @@ func (ctx *Ctx) LockDir(nodeId *NodeId, lockCtx string) (*os.File, error) {
        )
        if err != nil {
                ctx.LogE("lockdir-open", LEs{{"Path", lockPath}}, err, func(les LEs) string {
-                       return "Locking directory: opening %s" + lockPath
+                       return "Locking directory: opening " + lockPath
                })
                return nil, err
        }
        err = unix.Flock(int(dirLock.Fd()), unix.LOCK_EX|unix.LOCK_NB)
        if err != nil {
                ctx.LogE("lockdir-flock", LEs{{"Path", lockPath}}, err, func(les LEs) string {
-                       return "Locking directory: locking %s" + lockPath
+                       return "Locking directory: locking " + lockPath
                })
                dirLock.Close() // #nosec G104
                return nil, err
index d3c833e996b459e65d42e16220f872b94e68a388..da96a25bfd0785f9bdc7b8aa48e523b01c47360f 100644 (file)
@@ -46,7 +46,7 @@ func (ctx *Ctx) NewTmpFile() (*os.File, error) {
        fd, err := TempFile(jobsPath, "")
        if err == nil {
                ctx.LogD("tmp", LEs{{"Src", fd.Name()}}, func(les LEs) string {
-                       return "Temporary file created: %s" + fd.Name()
+                       return "Temporary file created: " + fd.Name()
                })
        }
        return fd, err