aboutsummaryrefslogtreecommitdiff
path: root/cursor.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-02-25 14:11:46 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-03-07 13:03:51 +0000
commit1c467855da1c5568e8968fe1b9dd3b4ad9f8637a (patch)
tree1472085571adcc81b4178bf270b78d031f07a338 /cursor.c
parent75d1234103d47e59311203bf5e73f85b2e0fd983 (diff)
downloadqemu-1c467855da1c5568e8968fe1b9dd3b4ad9f8637a.zip
qemu-1c467855da1c5568e8968fe1b9dd3b4ad9f8637a.tar.gz
qemu-1c467855da1c5568e8968fe1b9dd3b4ad9f8637a.tar.bz2
Fix sign of sscanf format specifiers
All values read by sscanf are unsigned, so replace %d by %u. This signed / unsigned mismatch was detected by splint. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'cursor.c')
-rw-r--r--cursor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cursor.c b/cursor.c
index efc5917..76e262c 100644
--- a/cursor.c
+++ b/cursor.c
@@ -15,7 +15,8 @@ static QEMUCursor *cursor_parse_xpm(const char *xpm[])
uint8_t idx;
/* parse header line: width, height, #colors, #chars */
- if (sscanf(xpm[line], "%d %d %d %d", &width, &height, &colors, &chars) != 4) {
+ if (sscanf(xpm[line], "%u %u %u %u",
+ &width, &height, &colors, &chars) != 4) {
fprintf(stderr, "%s: header parse error: \"%s\"\n",
__FUNCTION__, xpm[line]);
return NULL;