changeset 254:82d168dd52fd

removed the obsolete pos argument from time_interval()
author markus schnalke <meillo@marmaro.de>
date Thu, 04 Nov 2010 14:45:42 -0300 (2010-11-04)
parents c28e8dfebfc3
children 2e7d3a02edb1
files src/conf.c src/fail_msg.c src/masqmail.c src/masqmail.h src/timeival.c
diffstat 5 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/conf.c	Thu Nov 04 14:36:47 2010 -0300
+++ b/src/conf.c	Thu Nov 04 14:45:42 2010 -0300
@@ -557,8 +557,7 @@
 		else if (strcmp(lval, "warn_intervals") == 0)
 			conf.warn_intervals = parse_list(rval, FALSE);
 		else if (strcmp(lval, "max_defer_time") == 0) {
-			gint dummy;
-			gint ival = time_interval(rval, &dummy);
+			gint ival = time_interval(rval);
 			if (ival < 0)
 				logwrite(LOG_WARNING, "invalid time interval for 'max_defer_time': %s\n", rval);
 			else
--- a/src/fail_msg.c	Thu Nov 04 14:36:47 2010 -0300
+++ b/src/fail_msg.c	Thu Nov 04 14:45:42 2010 -0300
@@ -133,12 +133,11 @@
 warn_msg_is_due(message * msg)
 {
 	time_t now = time(NULL);
-	gint dummy;
 
 	GList *node;
 	for (node = g_list_last(conf.warn_intervals); node; node = g_list_previous(node)) {
 		gchar *str_ival = (gchar *) (node->data);
-		gint ival = time_interval(str_ival, &dummy);
+		gint ival = time_interval(str_ival);
 		if (ival >= 0) {
 			DEBUG(5) debugf("ival = %d\n", ival);
 			DEBUG(5) debugf("now - msg->received_time = %d\n", now - msg->received_time);
--- a/src/masqmail.c	Thu Nov 04 14:36:47 2010 -0300
+++ b/src/masqmail.c	Thu Nov 04 14:45:42 2010 -0300
@@ -522,7 +522,6 @@
 		} else if (strncmp(opt, "q", 1) == 0) {
 			/* must be after the `qo' check */
 			gchar *optarg;
-			int dummy;
 
 			do_runq = TRUE;
 			mta_mode = MODE_RUNQUEUE;
@@ -530,7 +529,7 @@
 			if (optarg) {
 				/* not just one single queue run but regular runs */
 				mta_mode = MODE_DAEMON;
-				queue_interval = time_interval(optarg, &dummy);
+				queue_interval = time_interval(optarg);
 			}
 
 		} else if (strcmp(opt, "t") == 0) {
--- a/src/masqmail.h	Thu Nov 04 14:36:47 2010 -0300
+++ b/src/masqmail.h	Thu Nov 04 14:45:42 2010 -0300
@@ -515,7 +515,7 @@
 void destroy_table(GList * table);
 
 /* timeival.c */
-gint time_interval(gchar * str, gint * pos);
+gint time_interval(gchar * str);
 
 /* permissions.c */
 gboolean is_privileged_user(uid_t uid);
--- a/src/timeival.c	Thu Nov 04 14:36:47 2010 -0300
+++ b/src/timeival.c	Thu Nov 04 14:45:42 2010 -0300
@@ -22,7 +22,7 @@
 #include "masqmail.h"
 
 gint
-time_interval(gchar * str, gint * pos)
+time_interval(gchar * str)
 {
 	gchar buf[16];
 	gchar *p = str, *q = buf;
@@ -30,9 +30,7 @@
 
 	while (*p && isdigit(*p) && (q < buf + 15)) {
 		*(q++) = *(p++);
-		(*pos)++;
 	}
-	(*pos)++;
 	*q = '\0';
 	val = atoi(buf);