Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 586fcff

Browse filesBrowse files
authored
src: fix logically dead code reported by Coverity
Value of the `nwrite` variable will always be less than 0 when it reaches the `switch` statement because of the previous check, which causes `case 0` to never be executed, change the check to allow 0 or less. PR-URL: #48589 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 2f369cc commit 586fcff
Copy full SHA for 586fcff

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎src/quic/session.cc‎

Copy file name to clipboardExpand all lines: src/quic/session.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ uint64_t Session::SendDatagram(Store&& data) {
792792
1,
793793
uv_hrtime());
794794

795-
if (nwrite < 0) {
795+
if (nwrite < 1) {
796796
// Nothing was written to the packet.
797797
switch (nwrite) {
798798
case 0: {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.