From: Eric Allman Date: Fri, 11 Feb 1994 03:24:31 +0000 (-0800) Subject: better fix to NULL q_home problem X-Git-Tag: BSD-4_4_Lite1-Snapshot-Development~517 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/24fe630d561695a095ff8cc0db7778da61c1a2d3?hp=46977ce0b691104d3bfdf1aaf945decf18536bd7 better fix to NULL q_home problem SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.33 --- diff --git a/usr/src/usr.sbin/sendmail/src/envelope.c b/usr/src/usr.sbin/sendmail/src/envelope.c index 68f7992595..c4aca1abb9 100644 --- a/usr/src/usr.sbin/sendmail/src/envelope.c +++ b/usr/src/usr.sbin/sendmail/src/envelope.c @@ -7,7 +7,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)envelope.c 8.32 (Berkeley) %G%"; +static char sccsid[] = "@(#)envelope.c 8.33 (Berkeley) %G%"; #endif /* not lint */ #include "sendmail.h" @@ -699,9 +699,8 @@ setsender(from, e, delimptr, internal) if (e->e_from.q_home == NULL) { e->e_from.q_home = getenv("HOME"); - if (e->e_from.q_home == NULL) - e->e_from.q_home = ""; - if (strcmp(e->e_from.q_home, "/") == 0) + if (e->e_from.q_home != NULL && + strcmp(e->e_from.q_home, "/") == 0) e->e_from.q_home++; } e->e_from.q_uid = RealUid;