diff options
author | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
commit | d8ac4091605cafeed429956439b3365036470356 (patch) | |
tree | 86f85152c10afe3de06afc06d7738c614a3210cb /usr.bin/mail/cmd3.c | |
parent | 2d831c7d21d4e39820d9fe862e7ec818476c083b (diff) | |
download | FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.zip FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.tar.gz |
Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.
PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
Diffstat (limited to 'usr.bin/mail/cmd3.c')
-rw-r--r-- | usr.bin/mail/cmd3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c index 54a5d5e..bb0c1e5 100644 --- a/usr.bin/mail/cmd3.c +++ b/usr.bin/mail/cmd3.c @@ -293,7 +293,7 @@ preserve(msgvec) printf("Cannot \"preserve\" in edit mode\n"); return(1); } - for (ip = msgvec; *ip != NULL; ip++) { + for (ip = msgvec; *ip != 0; ip++) { mesg = *ip; mp = &message[mesg-1]; mp->m_flag |= MPRESERVE; @@ -312,7 +312,7 @@ unread(msgvec) { register int *ip; - for (ip = msgvec; *ip != NULL; ip++) { + for (ip = msgvec; *ip != 0; ip++) { dot = &message[*ip-1]; dot->m_flag &= ~(MREAD|MTOUCH); dot->m_flag |= MSTATUS; @@ -330,7 +330,7 @@ messize(msgvec) register struct message *mp; register int *ip, mesg; - for (ip = msgvec; *ip != NULL; ip++) { + for (ip = msgvec; *ip != 0; ip++) { mesg = *ip; mp = &message[mesg-1]; printf("%d: %d/%ld\n", mesg, mp->m_lines, mp->m_size); |