Nick Mathewson aa59d805f5 Clean up rtrim implementation
If I understand the C standard correctly, you can't actually point
at a position immediately _before_ the start of an object; only at the
position immediately after.

According to J.2 in the standard, in its big list of undefined behavior:

 "The behavior is undefined in the following circumstances:
     ...
   — Addition or subtraction of a pointer into, or just beyond, an
    array object and an integer type produces a result that does not
    point into, or just beyond, the same array object (6.5.6)."

So we've got to fix rtrim to not do that.  Also, make it unit tested,
and give it an evutil_*_ name.
2012-11-16 11:13:29 -05:00
..
2012-11-16 11:13:29 -05:00
2012-10-23 13:26:44 +01:00