[vlc-devel] [PATCH 2/2] misc/rtsp: Clarify conditional assignment

Marvin Scholz epirat07 at gmail.com
Thu Oct 3 17:10:37 CEST 2019


Found by lgtm.com
---
 modules/misc/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index d90f754357..1940aeb731 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -1251,7 +1251,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
     httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
     httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
     psz_cseq = httpd_MsgGet( query, "Cseq" );
-    psz_cseq ? i_cseq = atoi( psz_cseq ) : 0;
+    i_cseq = (psz_cseq) ? atoi( psz_cseq ) : 0;
     httpd_MsgAdd( answer, "CSeq", "%d", i_cseq );
     httpd_MsgAdd( answer, "Cache-Control", "%s", "no-cache" );
 
-- 
2.20.1 (Apple Git-117)



More information about the vlc-devel mailing list