Thread (8 messages) 8 messages, 4 authors, 2014-01-27

Re: [PATCH 3/3] avctp: Fix unchecked return value

flat view

From: Anderson Lizardo <hidden>
Date: 2014-01-24 15:00:58

Hi Andrei,

On Fri, Jan 24, 2014 at 10:56 AM, Andrei Emeltchenko
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
-       for (i = 0; key_map[i].name != NULL; i++)
+       for (i = 0; key_map[i].name != NULL; i++) {
                ioctl(fd, UI_SET_KEYBIT, key_map[i].uinput);
+               err = -errno;
+               error("ioctl UI_SET_KEYBIT: %s (%d)", strerror(-err), -err);
+               goto fail;
+       }
You seem to have missed the "if (ioctl(...) < 0)" above.

Best Regards,
-- 
Anderson Lizardo
http://www.indt.org/?lang=en
INdT - Manaus - Brazil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help