[lttng-dev] [PATCH lttng-tools] utils: Rework utils_parse_size_suffix

Simon Marchi simon.marchi at polymtl.ca
Thu Apr 10 16:14:56 EDT 2014


On 10 April 2014 15:57, David Goulet <dgoulet at efficios.com> wrote:
> On 10 Apr (11:30:19), Simon Marchi wrote:
>> 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.
>>
>> Would fix #633
>
> Why are you not sure of that? :P

Would fix if merged :P

> Can you explain *why* regex was a bad choice here (if the 633 ticket
> does not already explain it).

I did not say it was a *bad* choice, but when I look at the old and
new function, the new one seems less cryptic (without the matches and
all). This is debatable.

> Thanks!
> David



More information about the lttng-dev mailing list