diff options
Diffstat (limited to 'commands/crc.c')
-rw-r--r-- | commands/crc.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/commands/crc.c b/commands/crc.c index 580521d677..23ffd4360b 100644 --- a/commands/crc.c +++ b/commands/crc.c @@ -1,21 +1,7 @@ -/* - * crc.c - Calculate a crc32 checksum of a memory area - * - * Copyright (c) 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: © 2007 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix + +/* crc.c - Calculate a crc32 checksum of a memory area */ #include <common.h> #include <command.h> @@ -97,17 +83,11 @@ static int do_crc(int argc, char *argv[]) printf("CRC32 for %s 0x%08lx ... 0x%08lx ==> 0x%08lx", filename, (ulong)start, (ulong)start + total - 1, crc); - if (crcvarname) { - char *crcstr = basprintf("0x%lx", crc); - setenv(crcvarname, crcstr); - kfree(crcstr); - } + if (crcvarname) + pr_setenv(crcvarname, "0x%lx", crc); - if (sizevarname) { - char *sizestr = basprintf("0x%lx", total); - setenv(sizevarname, sizestr); - kfree(sizestr); - } + if (sizevarname) + pr_setenv(sizevarname, "0x%lx", total); #ifdef CONFIG_CMD_CRC_CMP if (vfilename) { |