ioutil: make the file compile on MacOS
[fw/openocd] / src / target / register.c
index 392455d013883c8b7d0dcdd1b802e7286c39bcd2..ab1e40b17a10d63cf89f2fdb4edfd7e9ccf5c6f4 100644 (file)
  *   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 "log.h"
+#include <helper/log.h>
 
 /**
  * @file
  * may be separate registers associated with debug or trace modules.
  */
 
-struct regregister_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;