summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-03-03 11:15:44 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-03-03 11:15:44 +0000
commit7d18683d6fdb993441cfbbacc353371dc690e5fe (patch)
tree8ff056fb948d1055a92c1d880bb87504b9a8392b
parent409b17240c00324d479bb427f01ec6f24e645e8c (diff)
Style.
-rw-r--r--sys/kern/uipc_mbuf.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 8a2a063734a..4436f9f9074 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.21 2000/03/03 06:19:22 angelos Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.22 2000/03/03 11:15:43 angelos Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -724,36 +724,35 @@ bad:
* Return a pointer to mbuf/offset of location in mbuf chain.
*/
struct mbuf *
-m_getptr(struct mbuf *m, int loc, int *off)
+m_getptr(m, loc, off)
+ struct mbuf *m;
+ int loc;
+ int *off;
{
- while (loc >= 0)
- {
- /* Normal end of search */
- if (m->m_len > loc)
- {
- *off = loc;
- return m;
- }
- else
- {
- loc -= m->m_len;
+ while (loc >= 0) {
+ /* Normal end of search */
+ if (m->m_len > loc) {
+ *off = loc;
+ return (m);
+ }
+ else {
+ loc -= m->m_len;
- if (m->m_next == NULL)
- {
- if (loc == 0)
- {
- *off = m->m_len; /* Point at the end of valid data */
- return m;
+ if (m->m_next == NULL) {
+ if (loc == 0) {
+ /* Point at the end of valid data */
+ *off = m->m_len;
+ return (m);
+ }
+ else
+ return (NULL);
+ }
+ else
+ m = m->m_next;
}
- else
- return NULL;
- }
- else
- m = m->m_next;
- }
- }
+ }
- return NULL;
+ return (NULL);
}
/*