X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Falgorithm.c;h=9fc9386048fc3bc6430ebe9553bdbd6217775703;hp=7643e3cb0391fd40f071c3a193bc1bc5e19b752b;hb=8f518d3592dd80bfc7637d16498f2994038ab77c;hpb=b1de5eb9a074b362e953e857c42cac9a9b18b2a3 diff --git a/src/target/algorithm.c b/src/target/algorithm.c index 7643e3cb03..9fc9386048 100644 --- a/src/target/algorithm.c +++ b/src/target/algorithm.c @@ -13,17 +13,15 @@ * 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(struct mem_param *param, uint32_t address, uint32_t size, enum param_direction direction) { @@ -43,7 +41,7 @@ void init_reg_param(struct reg_param *param, char *reg_name, uint32_t size, enum { 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; }