]> err.no Git - systemd/commitdiff
use MIN() MAX() from param.h
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 7 Jul 2009 17:30:19 +0000 (19:30 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 7 Jul 2009 17:30:19 +0000 (19:30 +0200)
libudev/libudev-private.h
libudev/libudev-util-private.c
udev/udevadm-monitor.c

index 5c10b4e37a9947c6047c034856f33303d44ae6cd..16f9f2e1c192fc0e4ab28a2eefb8981e5c2be9c6 100644 (file)
@@ -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
 
index 811db9cf39447cf591120fa33aa0094acd27998e..1a37490a9e364d76d1f2d305cd05f198bad0526f 100644 (file)
@@ -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;
index 73516069ba6f42efd12c7b0a15772b99dc7450e6..df1459ae17d5f8bb7b4379fd123efd4330c0fd5c 100644 (file)
@@ -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)