diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-03-16 11:37:01 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-03-16 16:27:01 +0100 |
commit | 5b26086e8e634d1fcd2e65dc164fd3453f43942b (patch) | |
tree | cc8b1a27ea294a0dd549881db45ec230cc7888b3 | |
parent | 428dd77c7ef528dd1769d7c9bb95cd0fb2eaf2a8 (diff) |
fdev: Improve readability
Change-Id: If81cdf43703b6ff3128ea79940ce240f56918b9d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | src/fdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -45,7 +45,7 @@ struct fdev *fdev_create(int fd) else { fdev->fd = fd; fdev->refcount = 3; /* set autoclose by default */ - fdev->repeat = -1; + fdev->repeat = -1; /* always repeat by default */ } return fdev; } @@ -151,8 +151,8 @@ void fdev_set_repeat(struct fdev *fdev, int count) void fdev_set_autoclose(struct fdev *fdev, int autoclose) { if (autoclose) - fdev->refcount |= 1; + fdev->refcount |= (unsigned)1; else - fdev->refcount &= -2; + fdev->refcount &= ~(unsigned)1; } |