linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: maximilian attems <max@stro.at>
To: linux-raid@vger.kernel.org
Cc: Neil Brown <neilb@suse.de>, maximilian attems <max@stro.at>
Subject: [PATCH] [mdadm] Monitor.c s/MAXINT/INT_MAX/g
Date: Wed, 26 Sep 2007 18:12:46 +0200	[thread overview]
Message-ID: <1190823168772-git-send-email-max@stro.at> (raw)
In-Reply-To: <11908231671738-git-send-email-max@stro.at>

include limits.h directly instead of values.h

Signed-off-by: maximilian attems <max@stro.at>
---
 Monitor.c |   12 ++++++------
 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)
 					) {
-- 
1.5.3.1


  reply	other threads:[~2007-09-26 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 16:12 [PATCH] [mdadm] Monitor.c include signal.h directly maximilian attems
2007-09-26 16:12 ` maximilian attems [this message]
2007-09-26 16:12   ` [PATCH] [mdadm] mdopen.c don't shadow major() and minor() maximilian attems
2007-09-27  0:09 ` [PATCH] [mdadm] Monitor.c include signal.h directly Neil Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1190823168772-git-send-email-max@stro.at \
    --to=max@stro.at \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).