[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 4/5] lib/nolib.c: fix checkpatch issues for asprintf.c



This should be ignored and dropped. We have a better 4/5 patch in the
series.

Thanks,
Costin

On 08/01/2018 11:02 AM, Costin Lupu wrote:
> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
> ---
>  lib/nolibc/asprintf.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/nolibc/asprintf.c b/lib/nolibc/asprintf.c
> index 23a2544..905aac3 100644
> --- a/lib/nolibc/asprintf.c
> +++ b/lib/nolibc/asprintf.c
> @@ -28,18 +28,22 @@
>  int vasprintf(char **s, const char *fmt, va_list ap)
>  {
>       va_list ap2;
> +     int l;
> +
>       va_copy(ap2, ap);
> -     int l = vsnprintf(0, 0, fmt, ap2);
> +     l = vsnprintf(0, 0, fmt, ap2);
>       va_end(ap2);
>  
> -     if (l<0 || !(*s=malloc(l+1U))) return -1;
> -     return vsnprintf(*s, l+1U, fmt, ap);
> +     if (l < 0 || !(*s = malloc(l + 1U)))
> +             return -1;
> +     return vsnprintf(*s, l + 1U, fmt, ap);
>  }
>  
>  int asprintf(char **s, const char *fmt, ...)
>  {
>       int ret;
>       va_list ap;
> +
>       va_start(ap, fmt);
>       ret = vasprintf(s, fmt, ap);
>       va_end(ap);
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.