X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Falgorithm.c;h=9fc9386048fc3bc6430ebe9553bdbd6217775703;hb=7819834ace37ca7f5d1b834c761dfcb9964ef845;hp=5fcbfd30e8a685b11e74e4234d5997307e3cfa51;hpb=3c2eabd20f5182c53f0bfb0c6f2a9f2595434e87;p=openocd.git
diff --git a/src/target/algorithm.c b/src/target/algorithm.c
index 5fcbfd30e8..9fc9386048 100644
--- a/src/target/algorithm.c
+++ b/src/target/algorithm.c
@@ -13,19 +13,17 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * along with this program. If not, see . *
***************************************************************************/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "algorithm.h"
-#include "binarybuffer.h"
-
+#include
-void init_mem_param(mem_param_t *param, uint32_t address, uint32_t size, enum param_direction direction)
+void init_mem_param(struct mem_param *param, uint32_t address, uint32_t size, enum param_direction direction)
{
param->address = address;
param->size = size;
@@ -33,21 +31,21 @@ void init_mem_param(mem_param_t *param, uint32_t address, uint32_t size, enum pa
param->direction = direction;
}
-void destroy_mem_param(mem_param_t *param)
+void destroy_mem_param(struct mem_param *param)
{
free(param->value);
param->value = NULL;
}
-void init_reg_param(reg_param_t *param, char *reg_name, uint32_t size, enum param_direction direction)
+void init_reg_param(struct reg_param *param, char *reg_name, uint32_t size, enum param_direction direction)
{
param->reg_name = reg_name;
param->size = size;
- param->value = malloc(CEIL(size, 8));
+ param->value = malloc(DIV_ROUND_UP(size, 8));
param->direction = direction;
}
-void destroy_reg_param(reg_param_t *param)
+void destroy_reg_param(struct reg_param *param)
{
free(param->value);
param->value = NULL;