mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Be consistent about temporary variable use in adjacent loops.
Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL
This commit is contained in:
parent
f1903dc055
commit
41fc64c259
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350218
|
@ -559,10 +559,11 @@ _proc_name2map(struct proc_handle *p, const char *name)
|
|||
}
|
||||
/* If we didn't find a match, try matching prefixes of the basename. */
|
||||
for (i = 0; i < p->nmappings; i++) {
|
||||
strlcpy(path, p->mappings[i].map.pr_mapname, sizeof(path));
|
||||
mapping = &p->mappings[i];
|
||||
strlcpy(path, mapping->map.pr_mapname, sizeof(path));
|
||||
base = basename(path);
|
||||
if (strncmp(base, name, len) == 0)
|
||||
return (&p->mappings[i]);
|
||||
return (mapping);
|
||||
}
|
||||
if (strcmp(name, "a.out") == 0)
|
||||
return (_proc_addr2map(p,
|
||||
|
|
Loading…
Reference in a new issue