Code cleanup
This commit is contained in:
parent
4306e4b5ff
commit
38407e33c4
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2010 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS Network Probe */
|
||||
/* Probe is not free software; you can redistribute it and/or modify it under
|
||||
* the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0
|
||||
|
@ -156,12 +156,11 @@ static int _sysinfo_loads_sysctl(struct sysinfo * info)
|
|||
static int _sysinfo_ram_sysctl(struct sysinfo * info)
|
||||
{
|
||||
int mib[2];
|
||||
size_t len;
|
||||
struct uvmexp ue;
|
||||
size_t len = sizeof(ue);
|
||||
|
||||
mib[0] = CTL_VM;
|
||||
mib[1] = VM_UVMEXP;
|
||||
len = sizeof(ue);
|
||||
if(sysctl(mib, 2, &ue, &len, NULL, 0) == -1)
|
||||
{
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
|
Loading…
Reference in New Issue
Block a user