From 75432ce73f2f71929fe06882600db5e156528c39 Mon Sep 17 00:00:00 2001 From: chme Date: Wed, 19 Dec 2018 08:19:50 +0100 Subject: [PATCH] [rtsp] Initialize addr to avoid scan-build issue "Assigned value is garbage or undefined" --- src/evrtsp/rtsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evrtsp/rtsp.c b/src/evrtsp/rtsp.c index ea8ccc5a..98ca6191 100644 --- a/src/evrtsp/rtsp.c +++ b/src/evrtsp/rtsp.c @@ -1319,6 +1319,7 @@ evrtsp_connection_get_local_address(struct evrtsp_connection *evcon, *address = NULL; *port = 0; + memset(&addr, 0, sizeof(addr)); if (!evrtsp_connected(evcon)) return; @@ -1333,7 +1334,7 @@ evrtsp_connection_get_local_address(struct evrtsp_connection *evcon, if (!*address) return; - *family = addr.ss.ss_family; + *family = addr.sa.sa_family; switch (*family) {