summary refs log tree commit diff
path: root/bin/cash/mail.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-10 20:05:18 -0500
committerJune McEnroe <june@causal.agency>2019-01-10 20:05:18 -0500
commit75f6ed0d8f93446d8442cf7bcd97cb36ee956c7a (patch)
tree4d1557b37bd37bbbd4404e5661a343a5b5264bb9 /bin/cash/mail.c
parentReplace eaccess with faccessat (diff)
downloadsrc-75f6ed0d8f93446d8442cf7bcd97cb36ee956c7a.tar.gz
src-75f6ed0d8f93446d8442cf7bcd97cb36ee956c7a.zip
Replace strchrnul with strchr
Diffstat (limited to '')
-rw-r--r--bin/cash/mail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/cash/mail.c b/bin/cash/mail.c
index 81243b87..6f8a3d39 100644
--- a/bin/cash/mail.c
+++ b/bin/cash/mail.c
@@ -87,7 +87,8 @@ chkmail(int silent)
 		p = mpath;
 		if (*p == '\0')
 			break;
-		mpath = strchrnul(mpath, ':');
+		mpath = strchr(p, ':');
+		if (!mpath) mpath = strchr(p, '\0');
 		if (*mpath != '\0') {
 			*mpath++ = '\0';
 			if (p == mpath - 1)