diff options
Diffstat (limited to 'tools/checkxalloc.sh')
-rwxr-xr-x | tools/checkxalloc.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/checkxalloc.sh b/tools/checkxalloc.sh index 89940fe23..578340e26 100755 --- a/tools/checkxalloc.sh +++ b/tools/checkxalloc.sh @@ -11,3 +11,13 @@ cd "$(git rev-parse --show-toplevel)" || { git grep -zl '#include "xalloc.h"' | xargs -0 grep -nwE '[^x](([cm]|re)alloc|strdup)\(' + +result=$? + +if [ $result -eq 123 ]; then + exit 0 # not found +elif [ $result -eq 0 ]; then + exit 1 # found +fi + +exit $result |