Commit Graph

4 Commits

Author SHA1 Message Date
Dave Reisner 99d618c0eb checkxalloc: nudge regex, fix newfound instances
Using the -w flag with grep actually fought against us here, and hid
some instances where xalloc functions weren't used. Discard it in
favor of an explicit word boundary as a prefix to the function name,
and extend our requirements on the trailing side of the pattern.

This also fixes the few new instances that were overlooked because of
the regex's deficiency.

[kzak@redhat.com: - fix also newfound in findmnt
                  - remove unnecessary checks after xallocs]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 09:44:40 +01:00
Sami Kerola bb9da58e80 tools: add asprintf to checkxalloc script
Reported-By: Dave Reisner <d@falconindy.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-18 14:28:05 +01:00
Karel Zak d05a3e9713 build-sys: add checkxalloc to toplevel Makefile
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-04 14:25:21 +01:00
Dave Reisner e1e7be22ee tools: add new code checking script
Finds usage of strdup, malloc, calloc, and realloc when xalloc.h is
included.

http://marc.info/?l=util-linux-ng&m=132438338929925&w=2

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-04 13:53:08 +01:00