X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Frda.c;h=2d8bda8b1815ca51184170cac6f56c541ba71328;hb=0ed25f66ccc56d56b3b5b7d64f4537bafbb42697;hp=995909b09258d053f2bc542d845da14d53a03c2c;hpb=d5c0d8c9374623620844d539d4810da63e9abca1;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/rda.c b/src/src/rda.c index 995909b09..2d8bda8b1 100644 --- a/src/src/rda.c +++ b/src/src/rda.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2016 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ /* This module contains code for extracting addresses from a forwarding list @@ -715,30 +715,28 @@ if ((pid = fork()) == 0) yield == FF_FAIL || yield == FF_FREEZE) { address_item *addr; - for (addr = *generated; addr != NULL; addr = addr->next) + for (addr = *generated; addr; addr = addr->next) { int reply_options = 0; if ( rda_write_string(fd, addr->address) != 0 - || write(fd, &(addr->mode), sizeof(addr->mode)) - != sizeof(addr->mode) - || write(fd, &(addr->flags), sizeof(addr->flags)) - != sizeof(addr->flags) + || write(fd, &addr->mode, sizeof(addr->mode)) != sizeof(addr->mode) + || write(fd, &addr->flags, sizeof(addr->flags)) != sizeof(addr->flags) || rda_write_string(fd, addr->prop.errors_address) != 0 ) goto bad; - if (addr->pipe_expandn != NULL) + if (addr->pipe_expandn) { uschar **pp; - for (pp = addr->pipe_expandn; *pp != NULL; pp++) + for (pp = addr->pipe_expandn; *pp; pp++) if (rda_write_string(fd, *pp) != 0) goto bad; } if (rda_write_string(fd, NULL) != 0) goto bad; - if (addr->reply == NULL) + if (!addr->reply) { if (write(fd, &reply_options, sizeof(int)) != sizeof(int)) /* 0 means no reply */ goto bad; @@ -889,9 +887,9 @@ if (yield == FF_DELIVERED || yield == FF_NOTDELIVERED || /* Next comes the mode and the flags fields */ - if (read(fd, &(addr->mode), sizeof(addr->mode)) != sizeof(addr->mode) || - read(fd, &(addr->flags), sizeof(addr->flags)) != sizeof(addr->flags) || - !rda_read_string(fd, &(addr->prop.errors_address))) goto DISASTER; + if (read(fd, &addr->mode, sizeof(addr->mode)) != sizeof(addr->mode) || + read(fd, &addr->flags, sizeof(addr->flags)) != sizeof(addr->flags) || + !rda_read_string(fd, &addr->prop.errors_address)) goto DISASTER; /* Next comes a possible setting for $thisaddress and any numerical variables for pipe expansion, terminated by a NULL string. The maximum