Use bitfields for flags in the "addr" struct
[exim.git] / src / src / rda.c
index 995909b09258d053f2bc542d845da14d53a03c2c..fb3edac176f5a832bb0aa13924bb9fb0a72c2450 100644 (file)
@@ -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