From: Marcus Fritzsch Date: Tue, 11 Jul 2017 13:17:32 +0000 (+0200) Subject: main: appid and surfaceid in register_surface are unsigned X-Git-Tag: 4.99.1~251 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=675184e57e4b1a04f871babc2bc777c6f53e7b6f;p=staging%2Fwindowmanager.git main: appid and surfaceid in register_surface are unsigned Signed-off-by: Marcus Fritzsch --- diff --git a/src/main.cpp b/src/main.cpp index d4da785..4593f22 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -246,15 +246,15 @@ void register_surface(afb_req req) { return; } - int32_t appid = json_object_get_int(jappid); - int32_t surfid = json_object_get_int(jsurfid); + uint32_t appid = json_object_get_int(jappid); + uint32_t surfid = json_object_get_int(jsurfid); - if (appid < 0 || appid > 0xff) { + if (appid > 0xff) { afb_req_fail(req, "failed", "invalid appid"); return; } - if (surfid < 0 || surfid > 0xffff) { + if (surfid > 0xffff) { afb_req_fail(req, "failed", "invalid surfaceid"); return; }