Removed. Cleaned. Replaced unsafe strcpy by g_strlcpy.
* glibtop_machine.h (skip_token): Removed. * glibtop_server.h (skip_multiple_token): Cleaned. * netload.c: (glibtop_get_netload_s): Replaced unsafe strcpy by g_strlcpy. * procmap.c: (glibtop_get_proc_map_s): s/strncpy/g_strlcpy/. * procstate.c: (glibtop_get_proc_state_s): Likewise. * sysinfo.c: (init_sysinfo): Cleaned.
This commit is contained in:
@@ -33,14 +33,15 @@ static glibtop_sysinfo sysinfo;
|
||||
static void
|
||||
init_sysinfo (glibtop *server)
|
||||
{
|
||||
char buffer [BUFSIZ];
|
||||
static int init = 0;
|
||||
static gboolean is_init = FALSE;
|
||||
|
||||
char buffer [BUFSIZ];
|
||||
glibtop_entry *cpuinfo = NULL;
|
||||
FILE *f;
|
||||
|
||||
if (init) return;
|
||||
if (is_init) return;
|
||||
|
||||
init = TRUE;
|
||||
is_init = TRUE;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user