[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-commits
Subject: [haiku-commits] [S] Change in haiku[master]: kernel: Synchronize inet_addr.c to remove advertising c
From: Gerrit <review () review ! haiku-os ! org>
Date: 2023-08-31 21:40:12
Message-ID: 135e2a694e0d93565c76fbf59b9c0297d7cf9fcb-HTML () review ! haiku-os ! org
[Download RAW message or body]
From waddlesplash <waddlesplash@gmail.com>:
waddlesplash has uploaded this change for review. ( \
https://review.haiku-os.org/c/haiku/+/6877?usp=email )
Change subject: kernel: Synchronize inet_addr.c to remove advertising clause.
......................................................................
kernel: Synchronize inet_addr.c to remove advertising clause.
---
M src/system/kernel/util/inet_addr.c
1 file changed, 15 insertions(+), 10 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/77/6877/1
diff --git a/src/system/kernel/util/inet_addr.c b/src/system/kernel/util/inet_addr.c
index dca5d40..29517a2 100644
--- a/src/system/kernel/util/inet_addr.c
+++ b/src/system/kernel/util/inet_addr.c
@@ -1,4 +1,6 @@
-/*
+/*-
+ * SPDX-License-Identifier: (BSD-3-Clause AND ISC)
+ *
* Copyright (c) 1983, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -10,11 +12,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -176,23 +174,23 @@
case 2: /*%< a.b -- 8.24 bits */
if (val > 0xffffffU)
return (0);
- val |= parts[0] << 24;
+ val |= (uint32_t)parts[0] << 24;
break;
case 3: /*%< a.b.c -- 8.8.16 bits */
if (val > 0xffffU)
return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
+ val |= ((uint32_t)parts[0] << 24) | (parts[1] << 16);
break;
case 4: /*%< a.b.c.d -- 8.8.8.8 bits */
if (val > 0xffU)
return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+ val |= ((uint32_t)parts[0] << 24) | (parts[1] << 16) |
+ (parts[2] << 8);
break;
}
if (addr != NULL)
addr->s_addr = htonl(val);
return (1);
}
-
--
To view, visit https://review.haiku-os.org/c/haiku/+/6877?usp=email
To unsubscribe, or for help writing mail filters, visit \
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I03665bcad679e3fddaea0d8a95663be12b003bd8
Gerrit-Change-Number: 6877
Gerrit-PatchSet: 1
Gerrit-Owner: waddlesplash <waddlesplash@gmail.com>
Gerrit-MessageType: newchange
[Attachment #3 (text/html)]
<p>waddlesplash has uploaded this change for <strong>review</strong>.</p><p><a \
href="https://review.haiku-os.org/c/haiku/+/6877?usp=email">View Change</a></p><pre \
style="font-family: monospace,monospace; white-space: pre-wrap;">kernel: Synchronize \
inet_addr.c to remove advertising clause.<br>---<br>M \
src/system/kernel/util/inet_addr.c<br>1 file changed, 15 insertions(+), 10 \
deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: \
pre-wrap;">git pull ssh://git.haiku-os.org:22/haiku refs/changes/77/6877/1</pre><pre \
style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git \
a/src/system/kernel/util/inet_addr.c \
b/src/system/kernel/util/inet_addr.c</span><br><span>index dca5d40..29517a2 \
100644</span><br><span>--- a/src/system/kernel/util/inet_addr.c</span><br><span>+++ \
b/src/system/kernel/util/inet_addr.c</span><br><span>@@ -1,4 +1,6 @@</span><br><span \
style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(120, 100%, \
40%);">+/*-</span><br><span style="color: hsl(120, 100%, 40%);">+ * \
SPDX-License-Identifier: (BSD-3-Clause AND ISC)</span><br><span style="color: \
hsl(120, 100%, 40%);">+ *</span><br><span> * Copyright (c) 1983, 1990, \
1993</span><br><span> * The Regents of the University of California. All rights \
reserved.</span><br><span> *</span><br><span>@@ -10,11 +12,7 @@</span><br><span> * \
2. Redistributions in binary form must reproduce the above copyright</span><br><span> \
* notice, this list of conditions and the following disclaimer in \
the</span><br><span> * documentation and/or other materials provided with the \
distribution.</span><br><span style="color: hsl(0, 100%, 40%);">- * 3. All \
advertising materials mentioning features or use of this software</span><br><span \
style="color: hsl(0, 100%, 40%);">- * must display the following \
acknowledgement:</span><br><span style="color: hsl(0, 100%, 40%);">- * This product \
includes software developed by the University of</span><br><span style="color: hsl(0, \
100%, 40%);">- * California, Berkeley and its contributors.</span><br><span \
style="color: hsl(0, 100%, 40%);">- * 4. Neither the name of the University nor the \
names of its contributors</span><br><span style="color: hsl(120, 100%, 40%);">+ * 3. \
Neither the name of the University nor the names of its contributors</span><br><span> \
* may be used to endorse or promote products derived from this \
software</span><br><span> * without specific prior written \
permission.</span><br><span> *</span><br><span>@@ -176,23 +174,23 \
@@</span><br><span> case 2: /*%< a.b -- 8.24 bits */</span><br><span> if \
(val > 0xffffffU)</span><br><span> return (0);</span><br><span style="color: \
hsl(0, 100%, 40%);">- val |= parts[0] << 24;</span><br><span style="color: \
hsl(120, 100%, 40%);">+ val |= (uint32_t)parts[0] << 24;</span><br><span> \
break;</span><br><span> </span><br><span> case 3: /*%< a.b.c -- 8.8.16 bits \
*/</span><br><span> if (val > 0xffffU)</span><br><span> return \
(0);</span><br><span style="color: hsl(0, 100%, 40%);">- val |= (parts[0] << \
24) | (parts[1] << 16);</span><br><span style="color: hsl(120, 100%, \
40%);">+ val |= ((uint32_t)parts[0] << 24) | (parts[1] << \
16);</span><br><span> break;</span><br><span> </span><br><span> case 4: /*%< \
a.b.c.d -- 8.8.8.8 bits */</span><br><span> if (val > 0xffU)</span><br><span> \
return (0);</span><br><span style="color: hsl(0, 100%, 40%);">- val |= (parts[0] \
<< 24) | (parts[1] << 16) | (parts[2] << 8);</span><br><span \
style="color: hsl(120, 100%, 40%);">+ val |= ((uint32_t)parts[0] << 24) | \
(parts[1] << 16) |</span><br><span style="color: hsl(120, 100%, \
40%);">+ (parts[2] << 8);</span><br><span> break;</span><br><span> \
}</span><br><span> if (addr != NULL)</span><br><span> addr->s_addr = \
htonl(val);</span><br><span> return (1);</span><br><span> }</span><br><span \
style="color: hsl(0, 100%, 40%);">-</span><br><span></span><br></pre><p>To view, \
visit <a href="https://review.haiku-os.org/c/haiku/+/6877?usp=email">change 6877</a>. \
To unsubscribe, or for help writing mail filters, visit <a \
href="https://review.haiku-os.org/settings">settings</a>.</p><div itemscope \
itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" \
itemtype="http://schema.org/ViewAction"><link itemprop="url" \
href="https://review.haiku-os.org/c/haiku/+/6877?usp=email"/><meta itemprop="name" \
content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: haiku </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: \
I03665bcad679e3fddaea0d8a95663be12b003bd8 </div> <div style="display:none"> \
Gerrit-Change-Number: 6877 </div> <div style="display:none"> Gerrit-PatchSet: 1 \
</div> <div style="display:none"> Gerrit-Owner: waddlesplash \
<waddlesplash@gmail.com> </div> <div style="display:none"> Gerrit-MessageType: \
newchange </div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic