summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-16 03:13:22 +0200
committerKay Sievers <kay@vrfy.org>2012-04-16 19:20:57 +0200
commit8fef0ff25c9fd7e5bb99d66f43c6357e4996a3cc (patch)
tree8b570d9685b12ad1210c9ed857c18fa4e2e00913 /src/udev/udev-event.c
parentb59e246565337d6c6967059dd15a52a15277433e (diff)
udev: replace ARRAY_SIZE() with ELEMENTSOF()
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index bea316c18e..eab1bae27f 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -132,7 +132,7 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
goto copy;
}
- for (i = 0; i < ARRAY_SIZE(map); i++) {
+ for (i = 0; i < ELEMENTSOF(map); i++) {
if (strncmp(&from[1], map[i].name, strlen(map[i].name)) == 0) {
type = map[i].type;
from += strlen(map[i].name)+1;
@@ -148,7 +148,7 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
goto copy;
}
- for (i = 0; i < ARRAY_SIZE(map); i++) {
+ for (i = 0; i < ELEMENTSOF(map); i++) {
if (from[1] == map[i].fmt) {
type = map[i].type;
from += 2;
@@ -486,7 +486,7 @@ static void spawn_read(struct udev_event *event,
timeout = -1;
}
- fdcount = epoll_wait(fd_ep, ev, ARRAY_SIZE(ev), timeout);
+ fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), timeout);
if (fdcount < 0) {
if (errno == EINTR)
continue;