From 83c61128d86e6c32a43fa37604e27783d227112a Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Tue, 15 Aug 2023 14:34:48 +0500 Subject: [PATCH] Remove pointless pointer ref for a single string --- main.go | 2 +- rtmp/server.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index f048ec5..b6f1490 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ func NewIngestServer(srvr_type uint8, port string) (error) { var err error switch srvr_type { case 0: - err = rtmp.NewServer(&port) + err = rtmp.NewServer(port) } return err } diff --git a/rtmp/server.go b/rtmp/server.go index bb9cc6e..702a7e2 100644 --- a/rtmp/server.go +++ b/rtmp/server.go @@ -12,8 +12,8 @@ type ProtocolParams struct { stream_key string } -func NewServer(port *string) (error) { - l, err := net.Listen("tcp", ":" + *port) +func NewServer(port string) (error) { + l, err := net.Listen("tcp", ":" + port) if err != nil { return err }