From e12ac5f40c165bc5c1751b4f40d2569126483b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Fri, 18 Jun 2004 07:24:58 +0000 Subject: Whitespace cleanup. * loadavg.c: (glibtop_get_loadavg_s): Whitespace cleanup. * ppp.c: (get_ISDN_stats), (is_ISDN_on): Replace g_malloc by an array. * glibtop_server.c: (get_pageshift): * glibtop_server.h: * procmem.c: (glibtop_init_proc_mem_s), (glibtop_get_proc_mem_s): * procsegment.c: (glibtop_init_proc_segment_s), (glibtop_get_proc_segment_s): Moved the pageshift calculation to glibtop_server.[ch] * procstate.c: (glibtop_get_proc_state_s): * procuid.c: (glibtop_get_proc_uid_s): * sysinfo.c: (init_sysinfo): Minor cleanups. --- sysdeps/linux/glibtop_server.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sysdeps/linux/glibtop_server.h') diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index 0946cf1e..a522cefb 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -24,9 +24,11 @@ #ifndef __GLIBTOP_SERVER_H__ #define __GLIBTOP_SERVER_H__ +#include #include #include +#include G_BEGIN_DECLS @@ -34,6 +36,8 @@ G_BEGIN_DECLS #define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) +unsigned get_pageshift(); + static inline char * skip_token (const char *p) { @@ -87,9 +91,8 @@ static inline char * proc_stat_after_cmd (char *p) { p = strrchr (p, ')'); - if (!p) return p; - - *p++ = '\0'; + if (G_LIKELY(p)) + *p++ = '\0'; return p; } -- cgit v1.2.1