diff options
| -rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index e2e14be0..7e04cc37 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -38,6 +38,7 @@ uint16_t word(int, int); #define SIZE_16KB 0x4000 #define SIZE_128KB 0x20000 +uint8_t buf[SIZE_8KB]; uint16_t mac[3] = {0, 0, 0}; ssize_t nf; size_t partsize; @@ -197,11 +198,6 @@ nvmalloc(void) if ((cmd == cmd_copy) || (cmd == cmd_setchecksum) || (cmd == cmd_brick)) do_read[part ^ 1] = 0; - /* only allocate one block if only one part being read */ - uint8_t *buf = (uint8_t *) malloc(nf << (do_read[0] & do_read[1])); - if (buf == NULL) - err(errno, NULL); - gbe[0] = buf; /* speedhack: for cmd copy, both pointers are set the same */ |
