[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/4] trace-events: fix code style: %# -> 0x%
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/4] trace-events: fix code style: %# -> 0x% |
Date: |
Mon, 31 Jul 2017 07:48:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/29/2017 08:11 AM, Vladimir Sementsov-Ogievskiy wrote:
> In trace format '#' flag of printf is forbidden. Fix it to '0x%'.
>
> This patch is created by the following:
>
> check that we have a problem
>> find . -name trace-events | xargs grep '%#' | wc -l
> 56
>
> check that there are no cases with additional printf flags
>> find . -name trace-events | xargs grep '%[-+ 0]+#' | wc -l
> 0
Missing a check for the ' flag required by POSIX (but not C99); although
we don't use that either.
>
> check that there are no wrong usage of '#' and '0x' together
>> find . -name trace-events | xargs grep '0x%#' | wc -l
> 0
>
> fix the problem
>> find . -name trace-events | xargs sed -i 's/%#/0x%/g'
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature