mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
Use a for loop in find_kld_address() as in kgdb_auto_load_klds() and
replace the remaining goto's with continues as a result.
This commit is contained in:
parent
5ca09def5b
commit
9f24dd4d32
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175775
@ -173,18 +173,18 @@ find_kld_address (char *arg, CORE_ADDR *address)
|
||||
return (0);
|
||||
|
||||
filename = basename(arg);
|
||||
kld = kgdb_parse("linker_files.tqh_first");
|
||||
while (kld != 0) {
|
||||
for (kld = kgdb_parse("linker_files.tqh_first"); kld != 0;
|
||||
kld = read_pointer(kld + off_next)) {
|
||||
/* Try to read this linker file's filename. */
|
||||
target_read_string(read_pointer(kld + off_filename),
|
||||
&kld_filename, PATH_MAX, &error);
|
||||
if (error)
|
||||
goto next_kld;
|
||||
continue;
|
||||
|
||||
/* Compare this kld's filename against our passed in name. */
|
||||
if (strcmp(kld_filename, filename) != 0) {
|
||||
xfree(kld_filename);
|
||||
goto next_kld;
|
||||
continue;
|
||||
}
|
||||
xfree(kld_filename);
|
||||
|
||||
@ -196,9 +196,6 @@ find_kld_address (char *arg, CORE_ADDR *address)
|
||||
if (*address == 0)
|
||||
return (0);
|
||||
return (1);
|
||||
|
||||
next_kld:
|
||||
kld = read_pointer(kld + off_next);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user