don't call newstr() macro with arguments with subroutine calls, since
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 29 Jul 1993 23:31:52 +0000 (15:31 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Thu, 29 Jul 1993 23:31:52 +0000 (15:31 -0800)
it double-evaluates

SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.6
SCCS-vsn: usr.sbin/sendmail/src/collect.c 8.3
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.6
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 8.5
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.9
SCCS-vsn: usr.sbin/sendmail/src/queue.c 8.9

usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/daemon.c
usr/src/usr.sbin/sendmail/src/deliver.c
usr/src/usr.sbin/sendmail/src/envelope.c
usr/src/usr.sbin/sendmail/src/queue.c
usr/src/usr.sbin/sendmail/src/readcf.c

index e78463a..282be95 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)collect.c  8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)collect.c  8.3 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -50,7 +50,8 @@ maketemp(from)
        **  Create the temp file name and create the file.
        */
 
        **  Create the temp file name and create the file.
        */
 
-       e->e_df = newstr(queuename(e, 'd'));
+       e->e_df = queuename(e, 'd');
+       e->e_df = newstr(e->e_df);
        if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT, FileMode)) == NULL)
        {
                syserr("Cannot create %s", e->e_df);
        if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT, FileMode)) == NULL)
        {
                syserr("Cannot create %s", e->e_df);
index 20fbd0e..b7712cc 100644 (file)
@@ -12,9 +12,9 @@
 
 #ifndef lint
 #ifdef DAEMON
 
 #ifndef lint
 #ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c   8.5 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.6 (Berkeley) %G% (with daemon mode)";
 #else
 #else
-static char sccsid[] = "@(#)daemon.c   8.5 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c   8.6 (Berkeley) %G% (without daemon mode)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -555,7 +555,8 @@ getauthinfo(fd)
                return hbuf;
        }
 
                return hbuf;
        }
 
-       RealHostName = newstr(hostnamebyanyaddr(&fa));
+       p = hostnamebyanyaddr(&fa);
+       RealHostName = newstr(p);
        RealHostAddr = fa;
 
 #ifdef IDENTPROTO
        RealHostAddr = fa;
 
 #ifdef IDENTPROTO
index e1f8526..fdc41e7 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  8.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  8.9 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -362,7 +362,8 @@ sendall(e, mode)
                        if (e->e_df != NULL && mode != SM_VERIFY)
                        {
                                ee->e_dfp = NULL;
                        if (e->e_df != NULL && mode != SM_VERIFY)
                        {
                                ee->e_dfp = NULL;
-                               ee->e_df = newstr(queuename(ee, 'd'));
+                               ee->e_df = queuename(ee, 'd');
+                               ee->e_df = newstr(ee->e_df);
                                if (link(e->e_df, ee->e_df) < 0)
                                {
                                        syserr("sendall: link(%s, %s)",
                                if (link(e->e_df, ee->e_df) < 0)
                                {
                                        syserr("sendall: link(%s, %s)",
index 544bafb..d5ed56b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -414,7 +414,8 @@ settime(e)
        if (p != NULL)
                *p = '\0';
        define('d', dbuf, e);
        if (p != NULL)
                *p = '\0';
        define('d', dbuf, e);
-       p = newstr(arpadate(dbuf));
+       p = arpadate(dbuf);
+       p = newstr(p);
        if (macvalue('a', e) == NULL)
                define('a', p, e);
        define('b', p, e);
        if (macvalue('a', e) == NULL)
                define('a', p, e);
        define('b', p, e);
index 1551ebb..c4d93ee 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef QUEUE
 
 #ifndef lint
 #ifdef QUEUE
-static char sccsid[] = "@(#)queue.c    8.8 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c    8.9 (Berkeley) %G% (with queueing)";
 #else
 #else
-static char sccsid[] = "@(#)queue.c    8.8 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c    8.9 (Berkeley) %G% (without queueing)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -137,7 +137,8 @@ queueup(e, queueall, announce)
                register FILE *dfp;
                extern putbody();
 
                register FILE *dfp;
                extern putbody();
 
-               e->e_df = newstr(queuename(e, 'd'));
+               e->e_df = queuename(e, 'd');
+               e->e_df = newstr(e->e_df);
                fd = open(e->e_df, O_WRONLY|O_CREAT, FileMode);
                if (fd < 0)
                        syserr("!queueup: cannot create %s", e->e_df);
                fd = open(e->e_df, O_WRONLY|O_CREAT, FileMode);
                if (fd < 0)
                        syserr("!queueup: cannot create %s", e->e_df);
index 0f59a0c..2f60f8d 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)readcf.c   8.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c   8.5 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -355,7 +355,8 @@ readcf(cfname)
                        break;
 
                  case 'D':             /* macro definition */
                        break;
 
                  case 'D':             /* macro definition */
-                       define(bp[1], newstr(munchstring(&bp[2], NULL)), e);
+                       p = munchstring(&bp[2], NULL);
+                       define(bp[1], newstr(p), e);
                        break;
 
                  case 'H':             /* required header line */
                        break;
 
                  case 'H':             /* required header line */