[Spice-commits] src/spice-channel.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Aug 16 17:09:11 UTC 2017
src/spice-channel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a2dbe6a98abd1549e93fb8d7bf0f974bb5f0f74c
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Aug 10 23:02:48 2017 +0200
channel: return "unknown" in spice_channel_type_to_string()
This fixes the following gcc warning:
spice-channel.c: In function ‘spice_channel_constructed’:
spice-channel.c:144:41: error: ‘%s’ directive output may be truncated writing likely 20 or more bytes into a region of size 16 [-Werror=format-truncation=]
snprintf(c->name, sizeof(c->name), "%s-%d:%d",
^~
spice-channel.c:144:40: note: assuming directive output of 20 bytes
snprintf(c->name, sizeof(c->name), "%s-%d:%d",
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/spice-channel.c b/src/spice-channel.c
index 4c3db9d..8ff2f28 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -2136,7 +2136,7 @@ const gchar* spice_channel_type_to_string(gint type)
str = to_string[type];
}
- return str ? str : "unknown channel type";
+ return str ? str : "unknown";
}
/**
More information about the Spice-commits
mailing list