Skip to contentSkip to conversation

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

PATCH AlexChen 3 participants 3 messages Oct 19, 2020

lore
Share & tools
lore

AlexChen

author
#0 lore raw
---
 io/channel-websock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io/channel-websock.c +1 -1
index 47a0e941d9..e94a1fcf99 100644
@@ -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 ,
Signature · 1 line
2.19.1
#1 lore raw
Quoted 10 lines · AlexChen
---
 io/channel-websock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io/channel-websock.c +0 -0
index 47a0e941d9..e94a1fcf99 100644

io/channel-websock.c static int qio_channel_websock_decode_header(QIOChannelWebsock *ioc, · line 752

Quoted 8 lines
io/channel-websock.c +1 -1
@@ -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 ,

and added to my queue

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
In reply to AlexChen
Quoted 11 lines · AlexChen
---
  io/channel-websock.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
io/channel-websock.c +0 -0
index 47a0e941d9..e94a1fcf99 100644

io/channel-websock.c static int qio_channel_websock_decode_header(QIOChannelWebsock *ioc, · line 752

Quoted 8 lines
io/channel-websock.c +1 -1
@@ -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 ,