X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_bootmenu.c;h=163d5b2e2bdb1119e9f3f8f54ec0e43635726557;hb=c0a5b0816f545938bd8dccc1e775d0ea6e49b286;hp=a3cbffab24e4017d999752973b8f9a847ca5b8d5;hpb=5644369450635fa5c2967bee55b1ac41f6e988d0;p=u-boot diff --git a/common/cmd_bootmenu.c b/common/cmd_bootmenu.c index a3cbffab24..163d5b2e2b 100644 --- a/common/cmd_bootmenu.c +++ b/common/cmd_bootmenu.c @@ -1,23 +1,7 @@ /* * (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 @@ -64,12 +48,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); }