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:45:51 +0000 (10:45 -0400)
commit084ce6477c1b3f1720b3176e650232b10435e799
tree95c21a748ff6c8bccb615d49892468c22c7bf6e7
parente24b6c3eff660cf53a3bd4374e3787e2fe5cd6b2
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.02558 seconds and 4 git commands to generate.