Fix gcc80 -Wmultistatement-macros.
[dragonfly.git] / libexec / dma / net.c
index 26935a8..43b103b 100644 (file)
@@ -366,18 +366,20 @@ deliver_to_host(struct qitem *it, struct mx_hostentry *host)
                return (1);
 
 #define READ_REMOTE_CHECK(c, exp)      \
-       res = read_remote(fd, 0, NULL); \
-       if (res == 5) { \
-               syslog(LOG_ERR, "remote delivery to %s [%s] failed after %s: %s", \
-                      host->host, host->addr, c, neterr); \
-               snprintf(errmsg, sizeof(errmsg), "%s [%s] did not like our %s:\n%s", \
-                        host->host, host->addr, c, neterr); \
-               return (-1); \
-       } else if (res != exp) { \
-               syslog(LOG_NOTICE, "remote delivery deferred: %s [%s] failed after %s: %s", \
-                      host->host, host->addr, c, neterr); \
-               return (1); \
-       }
+       do { \
+               res = read_remote(fd, 0, NULL); \
+               if (res == 5) { \
+                       syslog(LOG_ERR, "remote delivery to %s [%s] failed after %s: %s", \
+                              host->host, host->addr, c, neterr); \
+                       snprintf(errmsg, sizeof(errmsg), "%s [%s] did not like our %s:\n%s", \
+                                host->host, host->addr, c, neterr); \
+                       return (-1); \
+               } else if (res != exp) { \
+                       syslog(LOG_NOTICE, "remote delivery deferred: %s [%s] failed after %s: %s", \
+                              host->host, host->addr, c, neterr); \
+                       return (1); \
+               } \
+       while (0)
 
        /* Check first reply from remote host */
        if ((config.features & SECURETRANS) == 0 ||