]> Cypherpunks repositories - nncp.git/commitdiff
No unnecessary String() call develop
authorSergey Matveev <stargrave@stargrave.org>
Sun, 26 Oct 2025 11:12:56 +0000 (14:12 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 26 Oct 2025 11:12:56 +0000 (14:12 +0300)
src/toss.go

index e71496c3611b9cc378b31a150e1ba2b3894e1dae..bebad978e7c388a44398771d0c48f07457ae7c98 100644 (file)
@@ -185,8 +185,10 @@ func jobProcess(
                }
                if !opts.DryRun {
                        cmd := exec.Command(cmdline[0], append(cmdline[1:], args...)...)
-                       origin := sender.Id.String()
-                       if sender.Origin != nil {
+                       var origin string
+                       if sender.Origin == nil {
+                               origin = sender.Id.String()
+                       } else {
                                origin = sender.Origin.String()
                        }
                        cmd.Env = append(