[vlc-devel] [PATCH 2/2] demux: adaptive: remove redundant check of CRLF

Zhao Zhili quinkblack at foxmail.com
Thu Oct 12 10:12:42 CEST 2017


CRLF is stripped by readLine(), and the following code doesn't deal with
CRLF, so the check is redundant and suspicious.
---
 modules/demux/adaptive/http/HTTPConnection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp
index a1f81b61d8..f68bdab7c4 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -239,7 +239,7 @@ int HTTPConnection::parseReply()
     for( ;; )
     {
         std::string l = readLine();
-        if(l.empty() || l.compare("\r\n") == 0)
+        if(l.empty())
             break;
         lines.append(l);
 
-- 
2.14.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-demux-adaptive-remove-redundant-check-of-CRLF.patch
Type: application/octet-stream
Size: 944 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20171012/d8ca5a60/attachment.obj>


More information about the vlc-devel mailing list