X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_bootmenu.c;h=5879065c2ea45cc7b9731884aad1aa9a95128340;hb=24289208354c143967968755cff5c825a12e3f90;hp=a3cbffab24e4017d999752973b8f9a847ca5b8d5;hpb=8dc16cf9dd6196d99969d12741df186a61a2f9a3;p=u-boot diff --git a/common/cmd_bootmenu.c b/common/cmd_bootmenu.c index a3cbffab24..5879065c2e 100644 --- a/common/cmd_bootmenu.c +++ b/common/cmd_bootmenu.c @@ -1,30 +1,13 @@ /* * (C) Copyright 2011-2013 Pali Rohár * - * 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 as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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. - * - * 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 + * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include #include -#include #include #include #include @@ -64,12 +47,12 @@ enum bootmenu_key { static char *bootmenu_getoption(unsigned short int n) { - char name[MAX_ENV_SIZE] = "bootmenu_"; + char name[MAX_ENV_SIZE]; if (n > MAX_COUNT) return NULL; - sprintf(name + 9, "%d", n); + sprintf(name, "bootmenu_%d", n); return getenv(name); }