diff options
author | Rickard Green <[email protected]> | 2018-10-12 17:59:18 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2018-10-12 17:59:18 +0200 |
commit | 8e65d31faab67b9844bbbaaa6245b2da2dd97b76 (patch) | |
tree | fec253c9db3c1d24b77f3f4933b8361ef740266b /erts/emulator/drivers/common | |
parent | e620c8c507c33ebca6216d71a8de73bce2722ac2 (diff) | |
parent | 13baa4384c4c9c49e6d540bc8ae6b8946f2454ed (diff) | |
download | otp-8e65d31faab67b9844bbbaaa6245b2da2dd97b76.tar.gz otp-8e65d31faab67b9844bbbaaa6245b2da2dd97b76.tar.bz2 otp-8e65d31faab67b9844bbbaaa6245b2da2dd97b76.zip |
Merge branch 'maint'
* maint:
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.c | 7 |
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 944823b73e..0dabe705b3 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; } |