diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-07-07 19:30:19 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-07-07 19:30:19 +0200 |
commit | 257bb4cdac76c00be6e17b0b656df0a2d7ee7b4d (patch) | |
tree | e02f4c2f1c3d8c99237226e9a7a773d7947c08c9 | |
parent | e4c02c1ca68d74d040f5bb8cb0c0c244dd8adc71 (diff) |
use MIN() MAX() from param.h
-rw-r--r-- | libudev/libudev-private.h | 1 | ||||
-rw-r--r-- | libudev/libudev-util-private.c | 3 | ||||
-rw-r--r-- | udev/udevadm-monitor.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h index 5c10b4e37a..16f9f2e1c1 100644 --- a/libudev/libudev-private.h +++ b/libudev/libudev-private.h @@ -16,7 +16,6 @@ #include "libudev.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define UDEV_MAX(a,b) ((a) > (b) ? (a) : (b)) #define READ_END 0 #define WRITE_END 1 diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index 811db9cf39..1a37490a9e 100644 --- a/libudev/libudev-util-private.c +++ b/libudev/libudev-util-private.c @@ -20,6 +20,7 @@ #include <pwd.h> #include <grp.h> #include <sys/wait.h> +#include <sys/param.h> #include "libudev.h" #include "libudev-private.h" @@ -356,7 +357,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp, FD_SET(outpipe[READ_END], &readfds); if (errpipe[READ_END] > 0) FD_SET(errpipe[READ_END], &readfds); - fdcount = select(UDEV_MAX(outpipe[READ_END], errpipe[READ_END])+1, &readfds, NULL, NULL, NULL); + fdcount = select(MAX(outpipe[READ_END], errpipe[READ_END])+1, &readfds, NULL, NULL, NULL); if (fdcount < 0) { if (errno == EINTR) continue; diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c index 73516069ba..df1459ae17 100644 --- a/udev/udevadm-monitor.c +++ b/udev/udevadm-monitor.c @@ -204,7 +204,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) if (udev_monitor != NULL) FD_SET(udev_monitor_get_fd(udev_monitor), &readfds); - fdcount = select(UDEV_MAX(udev_monitor_get_fd(kernel_monitor), udev_monitor_get_fd(udev_monitor))+1, + fdcount = select(MAX(udev_monitor_get_fd(kernel_monitor), udev_monitor_get_fd(udev_monitor))+1, &readfds, NULL, NULL, NULL); if (fdcount < 0) { if (errno != EINTR) |