rfkill: fix typo [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2017-10-12 14:53:32 +02:00
parent e9aa2a14b0
commit dec4fae21b

View file

@ -201,7 +201,7 @@ static int rfkill_ro_open(int nonblock)
/* returns: 0 success, 1 read again, < 0 error */
static int rfkill_read_event(int fd, struct rfkill_event *event)
{
ssize_t len = read(fd, event, sizeof(event));
ssize_t len = read(fd, event, sizeof(*event));
if (len < 0) {
if (errno == EAGAIN)