[2/5](resend/rebased)hidclass.sys: Add USB Descriptor parsing

Alexandre Julliard julliard at winehq.org
Mon Sep 14 04:19:09 CDT 2015


Aric Stewart <aric at codeweavers.com> writes:

> +    if (!caps->IsRange)
> +    {
> +        static char out[30];
> +        unsigned int i;
> +        strcpy(out, "[ ");
> +        for (i = 0; i < caps->usage_count; i++)
> +            strcat(out, wine_dbg_sprintf("0x%x ", caps->u.NotRange.Usage[i]));
> +        strcat(out,"]");
> +        return out;

Having a static buffer defeats the purpose of using wine_dbg_sprintf.

> +static void debug_feature(struct feature *feature)
> +{
> +    if (!feature)
> +        return;
> +    TRACE("[\n\t type %s [%i]; %s; %s; %s; %s; %s; %s; %s; %s; %s\n\t %s\n]\n",

Please don't put \n in traces, that messes up the output. If you truly
need multiple lines, use separate TRACE statements.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list