]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: avoid strtol and strtod
authorEric Blake <eblake@redhat.com>
Thu, 19 Apr 2012 00:06:59 +0000 (18:06 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 19 Apr 2012 23:42:53 +0000 (17:42 -0600)
commitae27f341a7a48632b5bc5cc055ebf76772b36a27
treed7e557d94b95155a0d9578c9fa58ce7b2c164e34
parentc09acad352039d896f45374a8241910fb207ae56
build: avoid strtol and strtod

Ensure we don't introduce any more lousy integer parsing in new
code, while avoiding a scrub-down of existing legacy code.

Note that we also need to enable sc_prohibit_atoi_atof (see cfg.mk
local-checks-to-skip) before we are bulletproof, but that also
entails scrubbing I'm not ready to do at the moment.

* src/util/util.c (virStrToLong_i, virStrToLong_ui)
(virStrToLong_l, virStrToLong_ul, virStrToLong_ll)
(virStrToLong_ull, virStrToDouble): Mark exemptions.
* src/util/virmacaddr.c (virMacAddrParse): Likewise.
* cfg.mk (sc_prohibit_strtol): New syntax check.
(exclude_file_name_regexp--sc_prohibit_strtol): Ignore files that
I'm not willing to fix yet.
(local-checks-to-skip): Re-enable sc_prohibit_atoi_atof.
cfg.mk
src/util/util.c
src/util/virmacaddr.c