Remove unnecessary variable and fix the usage of sysctl(3).
Differential Revision: D2733 Reviewed by: ngie, kib