[PATCH v2 2/6] riched20: Simplify the cursor from char offset function.