Fix an unneeded comparison with zero.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Dec 2018 00:23:10 +0000 (01:23 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Dec 2018 00:23:10 +0000 (01:23 +0100)
Found by Coverity Scan.

config.cpp

index 062f5bf..19628ec 100644 (file)
@@ -431,7 +431,7 @@ bool parse_stream(const ConfigLine &line, Config *config)
                        return false;
                }
                stream.hls_backlog_margin = stoi(hls_backlog_margin_it->second);
                        return false;
                }
                stream.hls_backlog_margin = stoi(hls_backlog_margin_it->second);
-               if (stream.hls_backlog_margin < 0 || stream.hls_backlog_margin >= stream.backlog_size) {
+               if (stream.hls_backlog_margin >= stream.backlog_size) {
                        log(ERROR, "'hls_backlog_margin' must be nonnegative, but less than the backlog size");
                        return false;
                }
                        log(ERROR, "'hls_backlog_margin' must be nonnegative, but less than the backlog size");
                        return false;
                }