Fix: rework utils_parse_size_suffix
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 10 Apr 2014 15:30:19 +0000 (11:30 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 14 Apr 2014 14:43:35 +0000 (10:43 -0400)
commit5983a922b5e591a0fd90800e482e1ab8b89a4281
tree0d11e8540a4d90be03cf951313ef56dacc51551a
parentebfa5166759c3b125a9d342e3fe1a227ba0fccf7
Fix: rework utils_parse_size_suffix

Ok, so there are a lot of problems with this function (sorry :|). Taking
the regex road is probably to complicated for nothing, so here is a
version without regexes.

I added many test cases as suggested by Sandeep Chaudhary and Daniel
Thibault. I tested on both Intel 32 and 64 bits.

Fixes #633

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/utils.c
src/common/utils.h
tests/unit/test_utils_parse_size_suffix.c
This page took 0.026017 seconds and 5 git commands to generate.