summaryrefslogtreecommitdiff
path: root/Monitor.c
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2007-09-26 18:12:46 +0200
committerNeil Brown <neilb@suse.de>2007-09-27 10:08:30 +1000
commit4450e59ffaf75623fa4261e244b0717a7463aa84 (patch)
tree79f470b17d91eba85424aa348e1db7fd00c06545 /Monitor.c
parentb440882edfb2dc4a2a295539ccd58fe4602da8ad (diff)
downloadmdadm-4450e59ffaf75623fa4261e244b0717a7463aa84.tar.gz
Monitor.c s/MAXINT/INT_MAX/g
include limits.h directly instead of values.h Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Monitor.c b/Monitor.c
index 246bdc0..8bc3ecc 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -32,7 +32,7 @@
#include "md_u.h"
#include <sys/wait.h>
#include <signal.h>
-#include <values.h>
+#include <limits.h>
#include <syslog.h>
static void alert(char *event, char *dev, char *disc, char *mailaddr, char *mailfrom,
@@ -172,7 +172,7 @@ int Monitor(mddev_dev_t devlist,
st->utime = 0;
st->next = statelist;
st->err = 0;
- st->devnum = MAXINT;
+ st->devnum = INT_MAX;
st->percent = -2;
st->expected_spares = mdlist->spare_disks;
if (mdlist->spare_group)
@@ -192,7 +192,7 @@ int Monitor(mddev_dev_t devlist,
st->utime = 0;
st->next = statelist;
st->err = 0;
- st->devnum = MAXINT;
+ st->devnum = INT_MAX;
st->percent = -2;
st->expected_spares = -1;
st->spare_group = NULL;
@@ -256,7 +256,7 @@ int Monitor(mddev_dev_t devlist,
close(fd);
continue;
}
- if (st->devnum == MAXINT) {
+ if (st->devnum == INT_MAX) {
struct stat stb;
if (fstat(fd, &stb) == 0 &&
(S_IFMT&stb.st_mode)==S_IFBLK) {
@@ -269,7 +269,7 @@ int Monitor(mddev_dev_t devlist,
for (mse2 = mdstat ; mse2 ; mse2=mse2->next)
if (mse2->devnum == st->devnum) {
- mse2->devnum = MAXINT; /* flag it as "used" */
+ mse2->devnum = INT_MAX; /* flag it as "used" */
mse = mse2;
}
@@ -402,7 +402,7 @@ int Monitor(mddev_dev_t devlist,
if (scan) {
struct mdstat_ent *mse;
for (mse=mdstat; mse; mse=mse->next)
- if (mse->devnum != MAXINT &&
+ if (mse->devnum != INT_MAX &&
(strcmp(mse->level, "raid0")!=0 &&
strcmp(mse->level, "linear")!=0)
) {