aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-10-12 17:47:52 +0200
committerRickard Green <[email protected]>2018-10-12 17:47:52 +0200
commit13baa4384c4c9c49e6d540bc8ae6b8946f2454ed (patch)
treef5b598ca5ced0fbc5c8b200d2a8e730ee9ca6d70 /erts/emulator/drivers/common
parentac243aeb32d3379a51564d4f2312bbb1a00a5271 (diff)
parentd9682b02b81fa6e23e554b6e017650eb89ecebed (diff)
downloadotp-13baa4384c4c9c49e6d540bc8ae6b8946f2454ed.tar.gz
otp-13baa4384c4c9c49e6d540bc8ae6b8946f2454ed.tar.bz2
otp-13baa4384c4c9c49e6d540bc8ae6b8946f2454ed.zip
Merge branch 'maint-21' into maint
* maint-21: Updated OTP version Prepare release erts: Fix UNC path handling on Windows erts: Fix a compiler warning eldap: Fix race at socket close Fix bug for sockopt pktoptions on BSD erts: Fix memory leak on file read errors
Diffstat (limited to 'erts/emulator/drivers/common')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 6d1c5cf6cc..f663ab0b05 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -7905,8 +7905,8 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
* cmsg options and values
*/
PLACE_FOR(1+4, ptr);
- *ptr = opt;
- arg_ptr = ptr+1; /* Where to put total length */
+ *ptr++ = opt;
+ arg_ptr = ptr; /* Where to put total length */
arg_sz = 0; /* Total length */
for (cmsg_top = (struct cmsghdr*)(cmsgbuf.buf + cmsg_sz),
cmsg = (struct cmsghdr*)cmsgbuf.buf;
@@ -7918,7 +7918,6 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
PLACE_FOR(1+4, ptr); \
*ptr++ = OPT; \
put_cmsg_int32(cmsg, ptr); \
- ptr += 4; \
arg_sz += 1+4; \
continue; \
}
@@ -7932,7 +7931,6 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
PUT_CMSG_INT32(IPPROTO_IP, IP_TTL, INET_OPT_TTL);
#endif
/* BSD uses the RECV* names in CMSG fields */
- }
#if defined(IPPROTO_IP) && defined(IP_RECVTOS)
PUT_CMSG_INT32(IPPROTO_IP, IP_RECVTOS, INET_OPT_TOS);
#endif
@@ -7943,6 +7941,7 @@ static ErlDrvSSizeT inet_fill_opts(inet_descriptor* desc,
PUT_CMSG_INT32(IPPROTO_IP, IP_RECVTTL, INET_OPT_TTL);
#endif
#undef PUT_CMSG_INT32
+ }
put_int32(arg_sz, arg_ptr); /* Put total length */
continue;
}