summaryrefslogtreecommitdiff
path: root/src/exim_monitor
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-09-15 23:58:57 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-09-17 17:06:54 +0100
commit4dc2379ac1ab6c21f265abed06dd9aaa214976af (patch)
tree670ec022658b12227261555cb654f9873b11207b /src/exim_monitor
parent0fb02f908683ac02f877d0433c832231ba4d34b2 (diff)
downloadexim4-4dc2379ac1ab6c21f265abed06dd9aaa214976af.tar.gz
tidying
Diffstat (limited to 'src/exim_monitor')
-rw-r--r--src/exim_monitor/em_TextPop.c2
-rw-r--r--src/exim_monitor/em_menu.c12
-rw-r--r--src/exim_monitor/em_strip.c12
3 files changed, 14 insertions, 12 deletions
diff --git a/src/exim_monitor/em_TextPop.c b/src/exim_monitor/em_TextPop.c
index faa51ed89..03f97da52 100644
--- a/src/exim_monitor/em_TextPop.c
+++ b/src/exim_monitor/em_TextPop.c
@@ -468,7 +468,7 @@ struct SearchAndReplace * search;
text.firstPos = 0;
text.format = FMT8BIT;
- dir = (XawTextScanDirection)(int) ((caddr_t)XawToggleGetCurrent(search->left_toggle) -
+ dir = (XawTextScanDirection) ((long)XawToggleGetCurrent(search->left_toggle) -
R_OFFSET);
pos = XawTextSearch( tw, dir, &text);
diff --git a/src/exim_monitor/em_menu.c b/src/exim_monitor/em_menu.c
index dc24e3dfa..6deb909da 100644
--- a/src/exim_monitor/em_menu.c
+++ b/src/exim_monitor/em_menu.c
@@ -137,24 +137,24 @@ static void
msglogAction(Widget w, XtPointer client_data, XtPointer call_data)
{
int i;
-Widget text = text_create((uschar *)client_data, text_depth);
-uschar * fname;
-FILE *f = NULL;
+Widget text = text_create(US client_data, text_depth);
+uschar * fname = NULL;
+FILE * f = NULL;
w = w; /* Keep picky compilers happy */
call_data = call_data;
/* End up with the split version, so message looks right when non-exist */
-for (i = 0; i < (spool_is_split? 2:1); i++)
+for (i = 0; i < (spool_is_split ? 2:1); i++)
{
- message_subdir[0] = i != 0 ? ((uschar *)client_data)[5] : 0;
+ message_subdir[0] = i != 0 ? (US client_data)[5] : 0;
fname = spool_fname(US"msglog", message_subdir, US client_data, US"");
if ((f = fopen(CS fname, "r")))
break;
}
-if (f == NULL)
+if (!f)
text_showf(text, "%s: %s\n", fname, strerror(errno));
else
{
diff --git a/src/exim_monitor/em_strip.c b/src/exim_monitor/em_strip.c
index 00675d46f..f0ad3abbb 100644
--- a/src/exim_monitor/em_strip.c
+++ b/src/exim_monitor/em_strip.c
@@ -58,12 +58,13 @@ a little game in order to ensure that the double value is correctly
passed back via the value pointer without the compiler doing an
unwanted cast. */
-static void stripchartAction(Widget w, XtPointer client_data, XtPointer value)
+static void
+stripchartAction(Widget w, XtPointer client_data, XtPointer value)
{
-double *ptr = (double *)value;
+double * ptr = (double *)value;
static int thresholds[] =
{10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 0};
-int num = (int)client_data;
+int num = (long)client_data;
int oldmax = 0;
int newmax = 0;
int newvalue = 0;
@@ -213,7 +214,8 @@ and for the second if it is a partition size display; its update time is
initially set to 1 second so that it gives an immediate display of the queue.
The first time its callback function is obeyed, the update time gets reset. */
-void create_stripchart(Widget parent, uschar *title)
+void
+create_stripchart(Widget parent, uschar *title)
{
Widget chart;
@@ -249,7 +251,7 @@ xs_SetValues(chart, 11,
XtNfromVert, label);
XtAddCallback(chart, "getValue", stripchartAction,
- (XtPointer)stripchart_count);
+ (XtPointer)(long)stripchart_count);
stripchart_last_total[stripchart_count] = 0;
stripchart_max[stripchart_count] = 10;