]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix `get_int_via_sysctlbyname(..)` on Jenkins
authorngie <ngie@FreeBSD.org>
Mon, 22 Apr 2019 11:09:24 +0000 (11:09 +0000)
committerngie <ngie@FreeBSD.org>
Mon, 22 Apr 2019 11:09:24 +0000 (11:09 +0000)
commitd38d5862c8a09ab88f2d09571c1f0de4f0e5a912
tree1058faa18140615cfca1652e7bb7d5eb41fa7052
parent8752233742e58f015043521829fd0792f1728c6e
Fix `get_int_via_sysctlbyname(..)` on Jenkins

Initialize `oldlen` to the size of the value, instead of leaving the value
unitialized. Leaving it unitialized seems to work by accident on amd64 when
running 64-bit programs, but not on i386.

This matches patterns in use in other programs.

PR: 237458
Approved by: emaste (mentor; implicit)
MFC after: 1 week
Tested on: ^/head (amd64), ^/stable/11 (i386)
lib/libc/tests/sys/sendfile_test.c