]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: fix syntax of profiler/xprof_type.h (#669)
authorAmos Jeffries <yadij@users.noreply.github.com>
Sat, 20 Jun 2020 14:07:26 +0000 (14:07 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 20 Jun 2020 14:07:29 +0000 (14:07 +0000)
Generate xprof_type.h compliant with Squid coding
guidelines to prevent syntax collisions when astyle
is not available to enforce correctness.

scripts/source-maintenance.sh

index fa6e904cc90dc381832039df1bfd3bcf5f9c9d63..9102dd2010dc9ef8045ceef8e577ae6bcfafc8f9 100755 (executable)
@@ -312,11 +312,13 @@ echo "#define _PROFILER_XPROF_TYPE_H_"
 echo "/* AUTO-GENERATED FILE */"
 echo "#if USE_XPROF_STATS"
 echo "typedef enum {"
-echo "  XPROF_PROF_UNACCOUNTED,"
-grep -R -h "PROF_start.*" ./* | grep -v probename | sed -e 's/ //g; s/PROF_start(/XPROF_/; s/);/,/' | sort -u
-echo "  XPROF_LAST } xprof_type;"
+echo "    XPROF_PROF_UNACCOUNTED,"
+grep -R -h "PROF_start.*" ./* | grep -v probename | sed -e 's/ //g; s/PROF_start(/    XPROF_/; s/);/,/;' | sort -u
+echo "    XPROF_LAST"
+echo "} xprof_type;"
 echo "#endif"
 echo "#endif"
+echo ""
 ) >lib/profiler/list
 mv lib/profiler/list lib/profiler/xprof_type.h