diff --git a/do-clang-format.sh b/do-clang-format.sh
index 816ef19bdb0646f8d1de7ac9703fa8ccb156adfe..4141a193d64b0cbc25c12261b440b8c0cd1f84ca 100755
--- a/do-clang-format.sh
+++ b/do-clang-format.sh
@@ -5,7 +5,7 @@ command="clang-format -style=file `find . -iregex '^.*\.\(cc\|h\)$' -not -path '
 if [ "$1" == "check" ];
 then
     `! ${command}  -output-replacements-xml | grep -qc "<replacement "` || \
-        { echo "format-check FAILED!"; exit $ERRCODE; }
+        { echo "format-check FAILED!"; exit 1; }
     echo "Congratulations: format-check succeeded"
 elif [ "$1" == "apply" ];
 then