[PATCH 14/15] cytune: use matching type in struct cyclades_control with kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/cytune.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c
index c93951d..d9bc900 100644
--- a/sys-utils/cytune.c
+++ b/sys-utils/cytune.c
@@ -62,7 +62,7 @@ struct cyclades_control {
 	struct cyclades_monitor c;
 	char *filename;
 	int cfile;
-	int maxmax;
+	unsigned long maxmax;
 	double maxtran;
 	unsigned long threshold_value;
 	unsigned long timeout_value;
@@ -132,7 +132,7 @@ signal_handler(int sig __attribute__((__unused__)))
 
 	for (i = local_optind; i < argc; i++, j++) {
 		cc = &cmon[j];
-		warnx(_("File %s, For threshold value %lu, Maximum characters in fifo were %d,\n"
+		warnx(_("File %s, For threshold value %lu, Maximum characters in fifo were %lu,\n"
 			"and the maximum transfer rate in characters/second was %f"),
 		      cc->filename, cc->threshold_value, cc->maxmax, cc->maxtran);
 	}
@@ -143,7 +143,7 @@ signal_handler(int sig __attribute__((__unused__)))
 static void print_statistics(struct cyclades_control *cc, int init)
 {
 	if (0 < cc->threshold_value && !init)
-		warnx(_("File %s, For threshold value %lu and timeout value %lu, Maximum characters in fifo were %d,\n"
+		warnx(_("File %s, For threshold value %lu and timeout value %lu, Maximum characters in fifo were %lu,\n"
 			"and the maximum transfer rate in characters/second was %f"),
 		      cc->filename, cc->threshold_value, cc->timeout_value, cc->maxmax, cc->maxtran);
 	cc->maxmax = 0;
@@ -221,8 +221,7 @@ query_tty_stats(int argc, char **argv, struct cytune_modifiers *mod)
 				/* Don't record this first cycle after change */
 				if (cc->maxtran < xfer_rate)
 					cc->maxtran = xfer_rate;
-				if (cc->maxmax < 0 ||
-				    (unsigned long)cc->maxmax < cywork.char_max)
+				if (cc->maxmax < cywork.char_max)
 					cc->maxmax = cywork.char_max;
 			}
 			printf(_("%s: %lu ints, %lu chars; fifo: %lu thresh, %lu tmout, "
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux