Skip to content

Commit 3b1a2be

Browse files
Merge pull request #10388 from RaimoNiskanen/raimo/erts/pvs-studio/OTP-19862
Fix socket related PVS Studio findings
2 parents 90d5a17 + 701a876 commit 3b1a2be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

erts/emulator/drivers/common/inet_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13527,7 +13527,7 @@ static int tcp_send_error(tcp_descriptor* desc, int err)
1352713527
* show_econnreset socket option enabled to receive {error, econnreset} on
1352813528
* both send and recv operations to indicate that an RST has been received.
1352913529
*/
13530-
#ifdef __WIN_32__
13530+
#ifdef __WIN32__
1353113531
if (err == ECONNABORTED)
1353213532
err = ECONNRESET;
1353313533
#endif

erts/emulator/nifs/common/prim_socket_nif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6040,7 +6040,7 @@ nif_sendfile(ErlNifEnv* env,
60406040

60416041
if ((! (a2ok = GET_INT64(env, argv[2], &offset64))) ||
60426042
(! GET_UINT64(env, argv[3], &count64u))) {
6043-
if ((! IS_INTEGER(env, argv[3])) ||
6043+
if ((! IS_INTEGER(env, argv[2])) ||
60446044
(! IS_INTEGER(env, argv[3])))
60456045
return enif_make_badarg(env);
60466046
if (! a2ok)

0 commit comments

Comments
 (0)