diff --git a/Makefile b/Makefile index 1756eda5c..b999c9c59 100644 --- a/Makefile +++ b/Makefile @@ -358,7 +358,7 @@ check-setup_locale: @tools/check-setup_locale.sh check-tmpctx: - @if git grep -n 'tal_free[(]tmpctx)' | grep -Ev '^ccan/|/test/|^common/daemon.c:|^common/utils.c:'; then echo "Don't free tmpctx!">&2; exit 1; fi + @if git grep -n 'tal_free[(]tmpctx)' | grep -Ev '^ccan/|/test/|^common/setup.c:|^common/utils.c:'; then echo "Don't free tmpctx!">&2; exit 1; fi check-discouraged-functions: @if git grep -E "[^a-z_/](fgets|fputs|gets|scanf|sprintf)\(" -- "*.c" "*.h" ":(exclude)ccan/"; then exit 1; fi diff --git a/tools/check-setup_locale.sh b/tools/check-setup_locale.sh index 39d87b33f..495f637f2 100755 --- a/tools/check-setup_locale.sh +++ b/tools/check-setup_locale.sh @@ -2,7 +2,7 @@ EXIT_CODE=0 for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/' | grep '.c$'); do - if ! grep -q 'setup_locale();' "${FILE}"; then + if ! grep -q -e 'setup_locale();' -e 'common_setup(argv\[0\]);' "${FILE}"; then echo "main(...) in ${FILE} does not call setup_locale() (see common/utils.h)" EXIT_CODE=1 fi