Diff Detail
Event Timeline
lib/sanitizer_common/sanitizer_printf.cc | ||
---|---|---|
43 | I would rename "num" to smth. like "absolute_value" | |
69–77 | RAW_CHECK(pos > 0); | |
78 | Oh, this is ugly. Can you write char c = (pad_with_zero || pos == 0) ? '0' : ' '); result += AppendChar(buff, buff_end, c); pos--; } | |
95 | Does negation works properly for INT_MIN here? | |
lib/sanitizer_common/tests/sanitizer_printf_test.cc | ||
107 | And now the function name doesn't make any sense. Please either rename it, or use different helper in Padding test. | |
145 | Add tests for both 2-digit and 4-digit numbers with %3d / %03d. |
LGTM
lib/sanitizer_common/sanitizer_printf.cc | ||
---|---|---|
71 | I'd prefer |
I would rename "num" to smth. like "absolute_value"