]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tools/checkxalloc.sh
3 # Find files which include the xalloc.h header, but which still call
4 # the unwrapped calloc and malloc.
7 cd "$(git rev-parse --show-toplevel)" ||
{
8 echo "error: failed to chdir to git root"
12 git
grep -zl '#include "xalloc.h"' |
13 xargs -0 grep -nE '\b(([cm]|re)alloc|strdup|asprintf)[[:space:]]*\([^)]'
17 if [ $result -eq 123 ]; then
19 elif [ $result -eq 0 ]; then