On 2/28/19 5:37 PM, Andrii Nakryiko wrote:
> -#define REALLOC_STATE_FN(NAME, COUNT, FIELD, SIZE) \
> -static int realloc_##NAME##_state(struct bpf_func_state *state, int size, \
> - bool copy_old) \
> -{ \
> - u32 old_size = state->COUNT; \
> - struct bpf_##NAME##_state *new_##FIELD; \
> - int slot = size / SIZE; \
> - \
> - if (size <= old_size || !size) { \
> - if (copy_old) \
> - return 0; \
> - state->COUNT = slot * SIZE; \
> - if (!size && old_size) { \
> - kfree(state->FIELD); \
> - state->FIELD = NULL; \
> - } \
> - return 0; \
> - } \
> +#define REALLOC_STATE_FN(NAME, COUNT, FIELD, SIZE) \
> +static int realloc_##NAME##_state(struct bpf_func_state *state, int size,
> \
> + bool copy_old) \
> +{ \
> + u32 old_size = state->COUNT; \what is the change here? extra tab at the end of every line? I think that adds too much noise to git history. I'd rather keep this bit as-is.
