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:
committed by
Benoît Dejean
parent
09f8aaec1e
commit
10211bf7da
@@ -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>
|
||||
|
||||
* procmap.c: (glibtop_get_proc_map_s):
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user