Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys remove some lint
details: https://anonhg.NetBSD.org/src/rev/a5b2816a2a02
branches: trunk
changeset: 509227:a5b2816a2a02
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Apr 30 01:13:20 2001 +0000
description:
remove some lint
diffstat:
sys/sys/boot_flag.h | 4 ++--
sys/sys/buf.h | 4 ++--
sys/sys/exec.h | 4 ++--
sys/sys/file.h | 8 ++++----
sys/sys/lock.h | 9 +++++++--
sys/sys/malloc.h | 4 ++--
sys/sys/mbuf.h | 42 +++++++++++++++++++++++-------------------
sys/sys/proc.h | 6 +++---
sys/sys/resourcevar.h | 4 ++--
sys/sys/sched.h | 10 +++++-----
sys/sys/signal.h | 6 +++---
sys/sys/signalvar.h | 4 ++--
sys/sys/socketvar.h | 12 ++++++------
sys/sys/systm.h | 12 ++++++------
sys/sys/time.h | 10 +++++-----
15 files changed, 74 insertions(+), 65 deletions(-)
diffs (truncated from 573 to 300 lines):
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/boot_flag.h
--- a/sys/sys/boot_flag.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/boot_flag.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot_flag.h,v 1.1 2000/09/24 12:32:31 jdolecek Exp $ */
+/* $NetBSD: boot_flag.h,v 1.2 2001/04/30 01:13:20 lukem Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,6 +72,6 @@
break; \
} /* switch */ \
\
- } while (0)
+ } while (/* CONSTCOND */ 0)
#endif /* _SYS_BOOT_FLAG_H_ */
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/buf.h
--- a/sys/sys/buf.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/buf.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buf.h,v 1.45 2000/11/27 18:26:40 chs Exp $ */
+/* $NetBSD: buf.h,v 1.46 2001/04/30 01:13:20 lukem Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -258,7 +258,7 @@
do { \
memset((bp)->b_data, 0, (u_int)(bp)->b_bcount); \
(bp)->b_resid = 0; \
-} while (0)
+} while (/* CONSTCOND */ 0)
/* Flags to low-level allocation routines. */
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/exec.h
--- a/sys/sys/exec.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/exec.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.h,v 1.78 2001/02/14 18:21:42 eeh Exp $ */
+/* $NetBSD: exec.h,v 1.79 2001/04/30 01:13:20 lukem Exp $ */
/*-
* Copyright (c) 1994 Christopher G. Demetriou
@@ -238,7 +238,7 @@
vcp->ev_offset = (offset); \
vcp->ev_prot = (prot); \
vcp->ev_flags = (flags); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#endif /* EXEC_DEBUG */
#endif /* _KERNEL */
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/file.h
--- a/sys/sys/file.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/file.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: file.h,v 1.25 2001/04/09 10:22:02 jdolecek Exp $ */
+/* $NetBSD: file.h,v 1.26 2001/04/30 01:13:20 lukem Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -93,7 +93,7 @@
do { \
if ((fp)->f_usecount < 0) \
panic(str); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#else
#define FILE_USE_CHECK(fp, str) /* nothing */
#endif
@@ -102,7 +102,7 @@
do { \
(fp)->f_usecount++; \
FILE_USE_CHECK((fp), "f_usecount overflow"); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define FILE_UNUSE(fp, p) \
do { \
@@ -113,7 +113,7 @@
(fp)->f_usecount--; \
FILE_USE_CHECK((fp), "f_usecount underflow"); \
} \
-} while (0)
+} while (/* CONSTCOND */ 0)
/*
* Flags for fo_read and fo_write.
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/lock.h
--- a/sys/sys/lock.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/lock.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.41 2000/11/24 03:59:09 chs Exp $ */
+/* $NetBSD: lock.h,v 1.42 2001/04/30 01:13:20 lukem Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -344,9 +344,14 @@
#define LOCK_ASSERT(x) /* nothing */
#else
#define simple_lock_init(alp) (alp)->lock_data = __SIMPLELOCK_UNLOCKED
+#define simple_lock_try(alp) (1)
+#ifndef lint
#define simple_lock(alp) (void)(alp)
-#define simple_lock_try(alp) (1)
#define simple_unlock(alp) (void)(alp)
+#else /* lint */
+#define simple_lock(alp) /* nothing */
+#define simple_unlock(alp) /* nothing */
+#endif /* lint */
#define LOCK_ASSERT(x) /* nothing */
#endif
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/malloc.h
--- a/sys/sys/malloc.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/malloc.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: malloc.h,v 1.59 2001/02/26 16:35:41 lukem Exp $ */
+/* $NetBSD: malloc.h,v 1.60 2001/04/30 01:13:21 lukem Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -397,7 +397,7 @@
kbp->kb_next = *(caddr_t *)(space); \
} \
splx(s); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define FREE(addr, type) \
do { \
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/mbuf.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.56 2001/01/14 02:07:22 thorpej Exp $ */
+/* $NetBSD: mbuf.h,v 1.57 2001/04/30 01:13:21 lukem Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc.
@@ -209,7 +209,7 @@
do { int ms = splvm(); \
{ code } \
splx(ms); \
- } while (0)
+ } while (/* CONSTCOND */ 0)
/*
* mbuf allocation/deallocation macros:
@@ -235,7 +235,7 @@
(m)->m_flags = 0; \
} else \
(m) = m_retry((how), (type)); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define MGETHDR(m, how, type) do { \
MBUFLOCK((m) = pool_get(&mbpool, (how) == M_WAIT ? PR_WAITOK|PR_LIMITFAIL : 0);); \
@@ -249,7 +249,7 @@
(m)->m_pkthdr.aux = (struct mbuf *)NULL; \
} else \
(m) = m_retryhdr((how), (type)); \
-} while (0)
+} while (/* CONSTCOND */ 0)
/*
* Macros for tracking external storage associated with an mbuf.
@@ -260,11 +260,11 @@
#define MCLREFDEBUGN(m, file, line) do { \
(m)->m_ext.ext_nfile = (file); \
(m)->m_ext.ext_nline = (line); \
- } while (0)
+ } while (/* CONSTCOND */ 0)
#define MCLREFDEBUGO(m, file, line) do { \
(m)->m_ext.ext_ofile = (file); \
(m)->m_ext.ext_oline = (line); \
- } while (0)
+ } while (/* CONSTCOND */ 0)
#else
#define MCLREFDEBUGN(m, file, line)
#define MCLREFDEBUGO(m, file, line)
@@ -277,7 +277,7 @@
(m)->m_ext.ext_prevref; \
(m)->m_ext.ext_prevref->m_ext.ext_nextref = \
(m)->m_ext.ext_nextref; \
- } while (0)
+ } while (/* CONSTCOND */ 0)
#define _MCLADDREFERENCE(o, n) do { \
(n)->m_flags |= ((o)->m_flags & (M_EXT|M_CLUSTER)); \
(n)->m_ext.ext_nextref = (o)->m_ext.ext_nextref; \
@@ -285,13 +285,13 @@
(o)->m_ext.ext_nextref = (n); \
(n)->m_ext.ext_nextref->m_ext.ext_prevref = (n); \
MCLREFDEBUGN((n), __FILE__, __LINE__); \
- } while (0)
+ } while (/* CONSTCOND */ 0)
#define MCLINITREFERENCE(m) do { \
(m)->m_ext.ext_prevref = (m); \
(m)->m_ext.ext_nextref = (m); \
MCLREFDEBUGO((m), __FILE__, __LINE__); \
MCLREFDEBUGN((m), NULL, 0); \
- } while (0)
+ } while (/* CONSTCOND */ 0)
#define MCLADDREFERENCE(o, n) MBUFLOCK(_MCLADDREFERENCE((o), (n));)
@@ -327,7 +327,7 @@
(m)->m_ext.ext_arg = NULL; \
MCLINITREFERENCE(m); \
} \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define MEXTMALLOC(m, size, how) do { \
(m)->m_ext.ext_buf = \
@@ -342,7 +342,7 @@
(m)->m_ext.ext_type = mbtypes[(m)->m_type]; \
MCLINITREFERENCE(m); \
} \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define MEXTADD(m, buf, size, type, free, arg) do { \
(m)->m_data = (m)->m_ext.ext_buf = (caddr_t)(buf); \
@@ -353,7 +353,7 @@
(m)->m_ext.ext_arg = (arg); \
(m)->m_ext.ext_type = (type); \
MCLINITREFERENCE(m); \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define _MEXTREMOVE(m) do { \
if (MCLISREFERENCED(m)) { \
@@ -368,7 +368,7 @@
} \
(m)->m_flags &= ~(M_CLUSTER|M_EXT); \
(m)->m_ext.ext_size = 0; /* why ??? */ \
-} while (0)
+} while (/* CONSTCOND */ 0)
#define MEXTREMOVE(m) \
MBUFLOCK(_MEXTREMOVE((m));)
@@ -384,7 +384,7 @@
(m)->m_data = (m)->m_pktdat; \
else \
(m)->m_data = (m)->m_dat; \
-} while (0)
+} while (/* CONSTCOND */ 0)
/*
* MFREE(struct mbuf *m, struct mbuf *n)
@@ -419,20 +419,24 @@
(from)->m_pkthdr.aux = (struct mbuf *)NULL; \
(to)->m_flags = (from)->m_flags & M_COPYFLAGS; \
(to)->m_data = (to)->m_pktdat; \
-} while (0)
+} while (/* CONSTCOND */ 0)
/*
* Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place
* an object of the specified size at the end of the mbuf, longword aligned.
*/
#define M_ALIGN(m, len) \
- do { (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); } while (0)
+ do { \
+ (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); \
+ } while (/* CONSTCOND */ 0)
/*
* As above, for mbufs allocated with m_gethdr/MGETHDR
* or initialized by M_COPY_PKTHDR.
*/
#define MH_ALIGN(m, len) \
- do { (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); } while (0)
+ do { \
+ (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); \
+ } while (/* CONSTCOND */ 0)
/*
* Compute the amount of space available
@@ -466,13 +470,13 @@
(m) = m_prepend((m), (plen), (how)); \
if ((m) && (m)->m_flags & M_PKTHDR) \
(m)->m_pkthdr.len += (plen); \
-} while (0)
+} while (/* CONSTCOND */ 0)
/* change mbuf to new type */
#define MCHTYPE(m, t) do { \
MBUFLOCK(mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[t]++;); \
(m)->m_type = t; \
-} while (0)
+} while (/* CONSTCOND */ 0)
/* length to m_copy to copy all */
#define M_COPYALL 1000000000
diff -r 9730702b5a57 -r a5b2816a2a02 sys/sys/proc.h
--- a/sys/sys/proc.h Mon Apr 30 00:36:07 2001 +0000
+++ b/sys/sys/proc.h Mon Apr 30 01:13:20 2001 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index