On 05/24/2013 03:53 AM, Michal Privoznik wrote:
> It may shorten the code a bit as the following pattern:
>
> VIR_STRNDUP(dst, src, cond ? n : strlen(src))
>
> is used on several places among our code. However, we can
> move the strlen into virStrndup and thus write just:
>
> VIR_STRNDUP(dst
It may shorten the code a bit as the following pattern:
VIR_STRNDUP(dst, src, cond ? n : strlen(src))
is used on several places among our code. However, we can
move the strlen into virStrndup and thus write just:
VIR_STRNDUP(dst, src, cond ? n : -1)
---
src/util/virstring.c | 7 ++-
s