Re: [PATCH 2/4] xwayland: Remove a useless out-of-memory check

2015-05-14 Thread Marek Chalupa
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

[PATCH 2/4] xwayland: Remove a useless out-of-memory check

2015-05-12 Thread Dima Ryazanov
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