diff options
author | mikeh <mikeh@FreeBSD.org> | 2001-05-27 20:26:22 +0000 |
---|---|---|
committer | mikeh <mikeh@FreeBSD.org> | 2001-05-27 20:26:22 +0000 |
commit | aa40e2eac7ab213ab193707b4dec5e4bb0a8325b (patch) | |
tree | 35781af5ff6a267c8e45e7cc6091e7df70c229ce /usr.bin/mail/v7.local.c | |
parent | 83f67b8f31f7864baf3998922833c641684ff0f0 (diff) | |
download | FreeBSD-src-aa40e2eac7ab213ab193707b4dec5e4bb0a8325b.zip FreeBSD-src-aa40e2eac7ab213ab193707b4dec5e4bb0a8325b.tar.gz |
Cleanup mail(1)'s varying styles by converting to using style(9).
Also take a stab at cleaning up BDECFLAGS and convert all uses of
NOSTR, NIL, NONE, NOVAR, NOGRP, NOGE to NULL. Also kill 'register' to
get diffs somewhat closer to OpenBSD/NetBSD.
There are no functional changes however.
Reviewed by: nra (visual inspection)
Diffstat (limited to 'usr.bin/mail/v7.local.c')
-rw-r--r-- | usr.bin/mail/v7.local.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c index 03f2775..3007a49 100644 --- a/usr.bin/mail/v7.local.c +++ b/usr.bin/mail/v7.local.c @@ -60,7 +60,7 @@ findmail(user, buf, buflen) char *user, *buf; int buflen; { - char *tmp = getenv("MAIL"); + char *tmp = getenv("MAIL"); if (tmp == NULL) (void)snprintf(buf, buflen, "%s/%s", _PATH_MAILDIR, user); @@ -75,8 +75,8 @@ void demail() { - if (value("keep") != NOSTR || rm(mailname) < 0) - close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if (value("keep") != NULL || rm(mailname) < 0) + (void)close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); } /* @@ -88,12 +88,12 @@ username() char *np; uid_t uid; - if ((np = getenv("USER")) != NOSTR) - return np; - if ((np = getenv("LOGNAME")) != NOSTR) - return np; - if ((np = getname(uid = getuid())) != NOSTR) - return np; + if ((np = getenv("USER")) != NULL) + return (np); + if ((np = getenv("LOGNAME")) != NULL) + return (np); + if ((np = getname(uid = getuid())) != NULL) + return (np); printf("Cannot associate a name with uid %u\n", (unsigned)uid); - return NOSTR; + return (NULL); } |