From 09950bc256e3628d275f90e016e6f5a039fbdcab Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Thu, 11 Dec 2014 12:55:03 -0800 Subject: merge_config.sh: Display usage if given too few arguments Two or more arguments are always expected. Show usage and exit if given less. Signed-off-by: Olof Johansson Signed-off-by: Michal Marek --- scripts/kconfig/merge_config.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 81b0c61bb9e2..2ab91b9b100d 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -77,6 +77,11 @@ while true; do esac done +if [ "$#" -lt 2 ] ; then + usage + exit +fi + INITFILE=$1 shift; -- cgit v1.2.3 From b6a2ab2cd4739a9573ed41677e53171987b8da34 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 12 Jan 2015 13:18:26 +0000 Subject: kconfig: use va_end to match corresponding va_start Although on some systems va_end is a no-op, it is good practice to use va_end, especially since the manual states: "Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function." Signed-off-by: Colin Ian King Signed-off-by: Michal Marek --- scripts/kconfig/confdata.c | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index f88d90f20228..28df18dd1147 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -59,6 +59,7 @@ static void conf_message(const char *fmt, ...) va_start(ap, fmt); if (conf_message_callback) conf_message_callback(fmt, ap); + va_end(ap); } const char *conf_get_configname(void) -- cgit v1.2.3