diff --git a/pmap.c b/pmap.c index 48a4f199..ae1aea99 100644 --- a/pmap.c +++ b/pmap.c @@ -208,12 +208,12 @@ out_destroy: return; } -static char *mapping_name(proc_t * p, unsigned KLONG addr, +static const char *mapping_name(const proc_t * p, unsigned KLONG addr, unsigned KLONG len, const char *mapbuf_b, unsigned showpath, unsigned dev_major, unsigned dev_minor, unsigned long long inode) { - char *cp; + const char *cp; if (!dev_major && dev_minor == shm_minor && strstr(mapbuf_b, "/SYSV")) { static char shmbuf[64]; @@ -228,14 +228,6 @@ static char *mapping_name(proc_t * p, unsigned KLONG addr, return cp[1] ? cp + 1 : cp; } - cp = strchr(mapbuf_b, '/'); - if (cp) { - if (showpath) - return cp; - /* it WILL succeed */ - return strrchr(cp, '/') + 1; - } - cp = _(" [ anon ]"); if ((p->start_stack >= addr) && (p->start_stack <= addr + len)) cp = _(" [ stack ]");