X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fregister.c;h=ab1e40b17a10d63cf89f2fdb4edfd7e9ccf5c6f4;hb=cf8a3c3d7075abad3c88cd604f8add4d06898abc;hp=7b26b740e578f31a8b22548833f79061a0e727e6;hpb=c79cca04bed78839a18e73f3996805eb8001a812;p=openocd.git diff --git a/src/target/register.c b/src/target/register.c index 7b26b740e5..ab1e40b17a 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -20,11 +20,11 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "types.h" #include "register.h" #include @@ -38,16 +38,14 @@ * may be separate registers associated with debug or trace modules. */ -struct reg* register_get_by_name(struct reg_cache *first, +struct reg *register_get_by_name(struct reg_cache *first, const char *name, bool search_all) { unsigned i; struct reg_cache *cache = first; - while (cache) - { - for (i = 0; i < cache->num_regs; i++) - { + while (cache) { + for (i = 0; i < cache->num_regs; i++) { if (strcmp(cache->reg_list[i].name, name) == 0) return &(cache->reg_list[i]); } @@ -61,7 +59,7 @@ struct reg* register_get_by_name(struct reg_cache *first, return NULL; } -struct reg_cache** register_get_last_cache_p(struct reg_cache **first) +struct reg_cache **register_get_last_cache_p(struct reg_cache **first) { struct reg_cache **cache_p = first;