[CRIU] [PATCH v2 0/6] New helpers for easy string construction

Stanislav Kinsburskiy skinsbursky at odin.com
Thu Dec 17 04:29:24 PST 2015


Please, ignore this set. Version 3 in upcoming.

17.12.2015 13:04, Stanislav Kinsburskiy пишет:
> This patch set introduced new helpers add_to_string() and construct_string(),
> which can be used to create or add to string a variable amount of parameters
> in the way, like sprintf does, but including allocation of sufficient buffer
> size.
> They can be used instead of manual rellocation of some string for
> concatenation or explicit allocation and printing.
> This patch set (except the first one, introducing helpers) replaces only
> realloc() calls and alloc()+sprintf() call, and reduces code base
> for 37 lines wth improving it's readability.
>
> v2:
> 1) Helpers names were changed
> 2) Added compiler attributed
> 3) Fixed mem leak


More information about the CRIU mailing list