Some more const.

2007-02-15  Benoît Dejean  <benoit@placenet.org>

	* procmap.c: (add_smaps):
	
	Some more const.

svn path=/trunk/; revision=2555
This commit is contained in:
Benoît Dejean
2007-02-15 21:09:11 +00:00
committed by Benoît Dejean
parent 09f8aaec1e
commit 10211bf7da
2 changed files with 8 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2007-02-15 Benoît Dejean <benoit@placenet.org>
* procmap.c: (add_smaps):
Some more const.
2007-01-14 Benoît Dejean <benoit@placenet.org> 2007-01-14 Benoît Dejean <benoit@placenet.org>
* procmap.c: (glibtop_get_proc_map_s): * procmap.c: (glibtop_get_proc_map_s):

View File

@@ -74,7 +74,7 @@ add_smaps(glibtop *server, FILE *smaps, glibtop_map_entry *entry)
#define SMAP_OFFSET(MEMBER) offsetof(glibtop_map_entry, MEMBER) #define SMAP_OFFSET(MEMBER) offsetof(glibtop_map_entry, MEMBER)
struct smap_value { struct smap_value {
const char *name; char name[15];
ptrdiff_t offset; ptrdiff_t offset;
}; };
@@ -94,7 +94,7 @@ add_smaps(glibtop *server, FILE *smaps, glibtop_map_entry *entry)
char *offset; char *offset;
guint64 *value; guint64 *value;
if (!fgets(line, sizeof line, smaps)) { if (!fgets(line, sizeof line, smaps) || !g_str_has_prefix(line, values[i].name)) {
glibtop_warn_io_r(server, glibtop_warn_io_r(server,
"Could not read smaps value %s", "Could not read smaps value %s",
values[i].name); values[i].name);