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

@@ -74,7 +74,7 @@ add_smaps(glibtop *server, FILE *smaps, glibtop_map_entry *entry)
#define SMAP_OFFSET(MEMBER) offsetof(glibtop_map_entry, MEMBER)
struct smap_value {
const char *name;
char name[15];
ptrdiff_t offset;
};
@@ -94,7 +94,7 @@ add_smaps(glibtop *server, FILE *smaps, glibtop_map_entry *entry)
char *offset;
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,
"Could not read smaps value %s",
values[i].name);