]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sat, 27 Jun 2020 14:32:05 +0000 (02:32 +1200)
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 c1d3411941f8fff96d97a1b4fd336d41896247f3..cfc68b2a97aee8f11316c377cb9f379a5444523f 100755 (executable)
@@ -214,11 +214,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