Checking for negative return value of snprintf is wrong, but snprintf can
actually "fail". It can truncate the output. However, since sizeof name is
256 and the length of "XWAYLAND%d" is always shorter that this, it is safe
here.
Reviewed-by: Marek Chalupa
On Tue, May 12, 2015 at 7:21 PM, Dima R
snprintf does not allocate memory, so we can never get an out-of-memory error.
(Also, the error handler would free xwl_output after it was already registered
as an event listener.)
Signed-off-by: Dima Ryazanov
---
hw/xwayland/xwayland-output.c | 6 +-
1 file changed, 1 insertion(+), 5 delet