* Exim Monitor *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2016 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
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
{
bodyAction(Widget w, XtPointer client_data, XtPointer call_data)
{
int i;
-Widget text = text_create((uschar *)client_data, text_depth);
+Widget text = text_create(US client_data, text_depth);
FILE *f = NULL;
w = w; /* Keep picky compilers happy */
for (i = 0; i < (spool_is_split? 2:1); i++)
{
uschar * fname;
- message_subdir[0] = i != 0 ? ((uschar *)client_data)[5] : 0;
+ message_subdir[0] = i != 0 ? (US client_data)[5] : 0;
fname = spool_fname(US"input", message_subdir, US client_data, US"-D");
if ((f = fopen(CS fname, "r")))
break;
if (rc == 0 && Ustrcmp(action + Ustrlen(action) - 4, "-Mes") == 0)
{
queue_item *q = find_queue(id, queue_noop, 0);
- if (q != NULL)
+ if (q)
{
- if (q->sender != NULL) store_free(q->sender);
+ if (q->sender) store_free(q->sender);
q->sender = store_malloc(Ustrlen(address_arg) + 1);
Ustrcpy(q->sender, address_arg);
}
{
w = w; /* Keep picky compilers happy */
call_data = call_data;
-ActOnMessage((uschar *)client_data, US"-v -M", US"");
+ActOnMessage(US client_data, US"-v -M", US"");
}
{
w = w; /* Keep picky compilers happy */
call_data = call_data;
-ActOnMessage((uschar *)client_data, US"-Mf", US"");
+ActOnMessage(US client_data, US"-Mf", US"");
}
{
w = w; /* Keep picky compilers happy */
call_data = call_data;
-ActOnMessage((uschar *)client_data, US"-Mt", US"");
+ActOnMessage(US client_data, US"-Mt", US"");
}
{
w = w; /* Keep picky compilers happy */
call_data = call_data;
-ActOnMessage((uschar *)client_data, US"-v -Mg", US"");
+ActOnMessage(US client_data, US"-v -Mg", US"");
}
{
w = w; /* Keep picky compilers happy */
call_data = call_data;
-ActOnMessage((uschar *)client_data, US"-Mrm", US"");
+ActOnMessage(US client_data, US"-Mrm", US"");
}
{
uschar buffer[256];
header_line *h, *next;
-Widget text = text_create((uschar *)client_data, text_depth);
+Widget text = text_create(US client_data, text_depth);
void *reset_point;
w = w; /* Keep picky compilers happy */
reset_point = store_get(0);
-sprintf(CS buffer, "%s-H", (uschar *)client_data);
+sprintf(CS buffer, "%s-H", US client_data);
if (spool_read_header(buffer, TRUE, FALSE) != spool_read_OK)
{
if (errno == ERRNO_SPOOLFORMAT)