X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/fcf1d5b30bd3b341fb7596aef395f347c6dc97b4..2dec14cd1dbf09755b0839859da1a942944a8376:/avr/env.c diff --git a/avr/env.c b/avr/env.c index 1b2e627..b2b4e6f 100644 --- a/avr/env.c +++ b/avr/env.c @@ -4,19 +4,13 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -#include -#include -#include +#include "env.h" #include #include "config.h" #include "debug.h" -#include "xmalloc.h" #include "crc.h" #include "getopt-min.h" -#include "command.h" -#include "env.h" #define ENV_SIZE (CONFIG_ENV_SIZE - sizeof(uint16_t) -1) @@ -200,7 +194,7 @@ int envlist_import(uint8_t flags) return -1; } - np = (char *) xmalloc(len+1); + np = (char *) malloc(len+1); if (np == NULL) { printf_P(PSTR("## Can't malloc %d bytes\n"), len+1); return 1; @@ -493,7 +487,7 @@ command_ret_t _do_env_set(uint_fast8_t flag, int argc, char * const argv[]) for (i = 2, len += 1; i < argc; ++i) len += strlen(argv[i]) + 1; - value = xmalloc(len); + value = malloc(len); if (value == NULL) { printf_P(PSTR("## Can't malloc %d bytes\n"), len); return CMD_RET_FAILURE;