diff mbox series

io: Don't use '#' flag of printf format

Message ID 5F8D8292.5030302@huawei.com
State New
Headers show
Series io: Don't use '#' flag of printf format | expand

Commit Message

Alex Chen Oct. 19, 2020, 12:12 p.m. UTC
Signed-off-by: AlexChen <alex.chen@huawei.com>
---
 io/channel-websock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel P. Berrangé Oct. 19, 2020, 12:18 p.m. UTC | #1
On Mon, Oct 19, 2020 at 08:12:02PM +0800, AlexChen wrote:
> Signed-off-by: AlexChen <alex.chen@huawei.com>
> ---
>  io/channel-websock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io/channel-websock.c b/io/channel-websock.c
> index 47a0e941d9..e94a1fcf99 100644
> --- a/io/channel-websock.c
> +++ b/io/channel-websock.c
> @@ -746,7 +746,7 @@ static int qio_channel_websock_decode_header(QIOChannelWebsock *ioc,
>              opcode != QIO_CHANNEL_WEBSOCK_OPCODE_CLOSE &&
>              opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PING &&
>              opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PONG) {
> -            error_setg(errp, "unsupported opcode: %#04x; only binary, close, "
> +            error_setg(errp, "unsupported opcode: 0x%04x; only binary, close, "
>                         "ping, and pong websocket frames are supported", opcode);
>              qio_channel_websock_write_close(
>                  ioc, QIO_CHANNEL_WEBSOCK_STATUS_INVALID_DATA ,

Acked-by: Daniel P. Berrangé <berrange@redhat.com>

and added to my queue

Regards,
Daniel
Philippe Mathieu-Daudé Oct. 19, 2020, 12:55 p.m. UTC | #2
On 10/19/20 2:12 PM, AlexChen wrote:
> Signed-off-by: AlexChen <alex.chen@huawei.com>
> ---
>   io/channel-websock.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io/channel-websock.c b/io/channel-websock.c
> index 47a0e941d9..e94a1fcf99 100644
> --- a/io/channel-websock.c
> +++ b/io/channel-websock.c
> @@ -746,7 +746,7 @@ static int qio_channel_websock_decode_header(QIOChannelWebsock *ioc,
>               opcode != QIO_CHANNEL_WEBSOCK_OPCODE_CLOSE &&
>               opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PING &&
>               opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PONG) {
> -            error_setg(errp, "unsupported opcode: %#04x; only binary, close, "
> +            error_setg(errp, "unsupported opcode: 0x%04x; only binary, close, "
>                          "ping, and pong websocket frames are supported", opcode);
>               qio_channel_websock_write_close(
>                   ioc, QIO_CHANNEL_WEBSOCK_STATUS_INVALID_DATA ,
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/io/channel-websock.c b/io/channel-websock.c
index 47a0e941d9..e94a1fcf99 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -746,7 +746,7 @@  static int qio_channel_websock_decode_header(QIOChannelWebsock *ioc,
             opcode != QIO_CHANNEL_WEBSOCK_OPCODE_CLOSE &&
             opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PING &&
             opcode != QIO_CHANNEL_WEBSOCK_OPCODE_PONG) {
-            error_setg(errp, "unsupported opcode: %#04x; only binary, close, "
+            error_setg(errp, "unsupported opcode: 0x%04x; only binary, close, "
                        "ping, and pong websocket frames are supported", opcode);
             qio_channel_websock_write_close(
                 ioc, QIO_CHANNEL_WEBSOCK_STATUS_INVALID_DATA ,