Added missing const qualifiers.

* sem_limits.c:
	* shm_limits.c:
	* swap.c: Added missing const qualifiers.

	* uptime.c: (glibtop_get_uptime_s): Cleaned up. Added boot_time.
This commit is contained in:
Benoît Dejean
2004-05-25 17:12:39 +00:00
parent 74453855aa
commit dc3027c438
10 changed files with 31 additions and 13 deletions

View File

@@ -25,9 +25,11 @@
#include <glibtop/error.h>
#include <glibtop/uptime.h>
#include <time.h>
#include "kernel.h"
static unsigned long _glibtop_sysdeps_uptime =
static const unsigned long _glibtop_sysdeps_uptime =
(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME);
/* Init function. */
@@ -61,4 +63,5 @@ glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
buf->uptime = (double) tbl.uptime.uptime / HZ;
buf->idletime = (double) tbl.uptime.idle / HZ;
buf->boot_time = (guint64) time(NULL) - (tbl.uptime.uptime / HZ);
}